sphinx indexer crashing when indexing data from mysql. Lost connection to MySQL server during query
===

I have been consistently getting sphinx indexer crashes at around 400k docs. The Mysql server has the timeout set to the max value.     
how do I prevent the crash from happening or find out what's causing the crash?
please see the following logs.  
<pre>
 indexer table1_current_update_index_chunk4
Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/usr/local/etc/sphinx.conf'...
indexing index 'table1_current_update_index_chunk4'...
ERROR: index 'table1_current_update_index_chunk4': sql_fetch_row: Lost connection to MySQL server during query.
total 469556 docs, 2325531810 bytes
total 198.547 sec, 11712724 bytes/sec, 2364.95 docs/sec
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 1090 writes, 1.289 sec, 992.6 kb/call avg, 1.1 msec/call avg

# indexer table1_current_update_index_chunk4
Sphinx 2.0.4-id64-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/usr/local/etc/sphinx.conf'...
indexing index 'table1_current_update_index_chunk4'...
ERROR: index 'table1_current_update_index_chunk4': sql_fetch_row: Lost connection to MySQL server during query.
total 424600 docs, 2099902173 bytes
total 176.859 sec, 11873270 bytes/sec, 2400.77 docs/sec
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 959 writes, 1.106 sec, 992.0 kb/call avg, 1.1 msec/call avg
</pre>

Here's the relevant sphinx.conf:
<pre>
source  table1_current_update_src_chunk4
{
        type                    = mysql

        sql_host                = localhost
        sql_user                = root
        sql_pass                = p1ssw2rd
        sql_db                  = table1crawler_update_3
        sql_port                = 3306  # optional, default is 3306                                                                                                                                                             \

        #sql_query_pre = SET NAMES utf8
        sql_query_range = select min(table1_id), max(table1_id) from table1

        sql_range_step = 100000

sql_query               = \
        SELECT  w.table1_id, unix_timestamp(w.audit_updated_date) as audit_updated_date, lower(w.domain_name) as domain_name, conv(substring(md5(lower(w.domain_name)),1,15), 16, 10) as\
 domain_id,  w.raw_text as raw_text, r.raw_text as raw_text2 \
               FROM table1 w, table2 r where w.table2_id=r.table2_id and w.table1_id&gt;=$star\
t and w.table1_id&lt;=$end


        sql_field_string         = domain_name
        sql_attr_bigint         = domain_id
        sql_attr_timestamp      = audit_updated_date

        sql_query_info          = SELECT w.*,r.* FROM table1 w, table2 r WHERE w.table2_id=r.registry_dat\
a_id and w.table1_id=$id


}

index table1_current_update_index_chunk4
{
        source                  = table1_current_update_src_chunk4
        path                    = /disk3/lib/sphinx/update/table1_current_update_chunk4
        docinfo                 = extern
        charset_type            = utf-8
        blend_chars             = -, @
}

indexer
{
        mem_limit               = 256M
}


searchd
{
        listen                  = 9312

        listen                  = 9306:mysql41
        log                     = /var/log/sphinx/searchd.log
        query_log               = /var/log/sphinx/query.log
        read_timeout            = 20
        max_children            = 200
        pid_file                = /var/run/sphinx/searchd.pid
        max_matches             = 100000
        seamless_rotate         = 1
        preopen_indexes         = 1
        unlink_old              = 1
        workers                 = threads #threads # for RT to work
        #read_buffer = 1M
        #read_unhinted = 500K
        dist_threads = 20
        binlog_path=/var/log/sphinx
}
</pre>