[Warning] Aborted connection...... (Got timeout reading communication packets)
Ladies and Gentlemen: I am getting below errors and therefore the user sessions terminate causing business impact...Can some one who is expertise already in this advice at the earliest? 120513 8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user: 'iibuser' host: '210.18.3.94' (Got timeout reading communication packets) OS version: RHEL 5.3 DB version: MYSQL 5.1 Table involved in the DB is of type : inndoDB Background : This is an online exam registration site DB and the concurrent connex invariably reaches to 200 for 500 users which should not be the case. Ideally the concurrent connex must be 10. Normally , we run truncate table before the exam starts up. A similar setup(in terms of DB/OS/config etc ) works fine which is actually DR at different site. PS: Network segment between web and DB tier has been thoroughly checked and seems to be fine. Thanks a ton! Best Rgs, Shafi AHMED Sify - Chennai Get your world in your inbox! Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id! Log on to http://www.sify.com ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Technologies Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at ad...@sifycorp.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: [Warning] Aborted connection...... (Got timeout reading communication packets)
Hello Shafi, The below blog will give you more information on the error - http://sureshkuna.blogspot.in/2010/12/aborted-connection-31084472-to-db-ms.html Thanks Suresh Kuna On Mon, May 21, 2012 at 1:15 PM, Shafi AHMED shafi.ah...@sifycorp.comwrote: Ladies and Gentlemen: I am getting below errors and therefore the user sessions terminate causing business impact...Can some one who is expertise already in this advice at the earliest? 120513 8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user: 'iibuser' host: '210.18.3.94' (Got timeout reading communication packets) OS version: RHEL 5.3 DB version: MYSQL 5.1 Table involved in the DB is of type : inndoDB Background : This is an online exam registration site DB and the concurrent connex invariably reaches to 200 for 500 users which should not be the case. Ideally the concurrent connex must be 10. Normally , we run truncate table before the exam starts up. A similar setup(in terms of DB/OS/config etc ) works fine which is actually DR at different site. PS: Network segment between web and DB tier has been thoroughly checked and seems to be fine. Thanks a ton! Best Rgs, Shafi AHMED Sify - Chennai Get your world in your inbox! Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id! Log on to http://www.sify.com ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Technologies Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at ad...@sifycorp.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql -- Thanks Suresh Kuna MySQL DBA
RE: [Warning] Aborted connection...... (Got timeout reading communication packets)
Hi suresh: I have gone through your blog..and feel it is more generic... Can you please elaborate why the other setup(DR) works fine when the similar prod(with no application code/web/db structural changes etc) has gone thru' successfully with no such warning msgs ? Thanks again... Best Rgs, Shafi AHMED Sify - Chennai -Original Message- From: Suresh Kuna [mailto:sureshkumar...@gmail.com] Sent: Monday, May 21, 2012 1:29 PM To: Shafi AHMED Cc: mysql@lists.mysql.com; shafi...@gmail.com Subject: Re: [Warning] Aborted connection.. (Got timeout reading communication packets) Hello Shafi, The below blog will give you more information on the error - http://sureshkuna.blogspot.in/2010/12/aborted-connection-31084472-to-db-ms.h tml Thanks Suresh Kuna On Mon, May 21, 2012 at 1:15 PM, Shafi AHMED shafi.ah...@sifycorp.comwrote: Ladies and Gentlemen: I am getting below errors and therefore the user sessions terminate causing business impact...Can some one who is expertise already in this advice at the earliest? 120513 8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user: 'iibuser' host: '210.18.3.94' (Got timeout reading communication packets) OS version: RHEL 5.3 DB version: MYSQL 5.1 Table involved in the DB is of type : inndoDB Background : This is an online exam registration site DB and the concurrent connex invariably reaches to 200 for 500 users which should not be the case. Ideally the concurrent connex must be 10. Normally , we run truncate table before the exam starts up. A similar setup(in terms of DB/OS/config etc ) works fine which is actually DR at different site. PS: Network segment between web and DB tier has been thoroughly checked and seems to be fine. Thanks a ton! Best Rgs, Shafi AHMED Sify - Chennai Get your world in your inbox! Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id! Log on to http://www.sify.com ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Technologies Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at ad...@sifycorp.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql -- Thanks Suresh Kuna MySQL DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: [Warning] Aborted connection...... (Got timeout reading communication packets)
Sorry- a typo :) Hi suresh: I have gone through your blog..and feel it is more generic... Can you please elaborate why the other setup(DR) works fine when the similar prod(with no application code/web/db structural changes etc) has gone thru' failures with such warning msgs ? Best Rgs, Shafi AHMED Sify - Chennai -Original Message- From: Shafi AHMED [mailto:shafi.ah...@sifycorp.com] Sent: Monday, May 21, 2012 2:04 PM To: 'Suresh Kuna' Cc: 'mysql@lists.mysql.com'; 'shafi...@gmail.com' Subject: RE: [Warning] Aborted connection.. (Got timeout reading communication packets) Hi suresh: I have gone through your blog..and feel it is more generic... Can you please elaborate why the other setup(DR) works fine when the similar prod(with no application code/web/db structural changes etc) has gone thru' failures with such warning msgs ? Thanks again... Best Rgs, Shafi AHMED Sify - Chennai -Original Message- From: Suresh Kuna [mailto:sureshkumar...@gmail.com] Sent: Monday, May 21, 2012 1:29 PM To: Shafi AHMED Cc: mysql@lists.mysql.com; shafi...@gmail.com Subject: Re: [Warning] Aborted connection.. (Got timeout reading communication packets) Hello Shafi, The below blog will give you more information on the error - http://sureshkuna.blogspot.in/2010/12/aborted-connection-31084472-to-db-ms.h tml Thanks Suresh Kuna On Mon, May 21, 2012 at 1:15 PM, Shafi AHMED shafi.ah...@sifycorp.comwrote: Ladies and Gentlemen: I am getting below errors and therefore the user sessions terminate causing business impact...Can some one who is expertise already in this advice at the earliest? 120513 8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user: 'iibuser' host: '210.18.3.94' (Got timeout reading communication packets) OS version: RHEL 5.3 DB version: MYSQL 5.1 Table involved in the DB is of type : inndoDB Background : This is an online exam registration site DB and the concurrent connex invariably reaches to 200 for 500 users which should not be the case. Ideally the concurrent connex must be 10. Normally , we run truncate table before the exam starts up. A similar setup(in terms of DB/OS/config etc ) works fine which is actually DR at different site. PS: Network segment between web and DB tier has been thoroughly checked and seems to be fine. Thanks a ton! Best Rgs, Shafi AHMED Sify - Chennai Get your world in your inbox! Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id! Log on to http://www.sify.com ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Technologies Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at ad...@sifycorp.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql -- Thanks Suresh Kuna MySQL DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: [Warning] Aborted connection...... (Got timeout reading communication packets)
This needs to be investigated on the server, and cannot be guessed. On Mon, May 21, 2012 at 2:29 PM, Shafi AHMED shafi.ah...@sifycorp.comwrote: Sorry- a typo :) Hi suresh: I have gone through your blog..and feel it is more generic... Can you please elaborate why the other setup(DR) works fine when the similar prod(with no application code/web/db structural changes etc) has gone thru' failures with such warning msgs ? Best Rgs, Shafi AHMED Sify - Chennai -Original Message- From: Shafi AHMED [mailto:shafi.ah...@sifycorp.com] Sent: Monday, May 21, 2012 2:04 PM To: 'Suresh Kuna' Cc: 'mysql@lists.mysql.com'; 'shafi...@gmail.com' Subject: RE: [Warning] Aborted connection.. (Got timeout reading communication packets) Hi suresh: I have gone through your blog..and feel it is more generic... Can you please elaborate why the other setup(DR) works fine when the similar prod(with no application code/web/db structural changes etc) has gone thru' failures with such warning msgs ? Thanks again... Best Rgs, Shafi AHMED Sify - Chennai -Original Message- From: Suresh Kuna [mailto:sureshkumar...@gmail.com] Sent: Monday, May 21, 2012 1:29 PM To: Shafi AHMED Cc: mysql@lists.mysql.com; shafi...@gmail.com Subject: Re: [Warning] Aborted connection.. (Got timeout reading communication packets) Hello Shafi, The below blog will give you more information on the error - http://sureshkuna.blogspot.in/2010/12/aborted-connection-31084472-to-db-ms.h tml Thanks Suresh Kuna On Mon, May 21, 2012 at 1:15 PM, Shafi AHMED shafi.ah...@sifycorp.comwrote: Ladies and Gentlemen: I am getting below errors and therefore the user sessions terminate causing business impact...Can some one who is expertise already in this advice at the earliest? 120513 8:19:45 [Warning] Aborted connection 1167257 to db: 'iib' user: 'iibuser' host: '210.18.3.94' (Got timeout reading communication packets) OS version: RHEL 5.3 DB version: MYSQL 5.1 Table involved in the DB is of type : inndoDB Background : This is an online exam registration site DB and the concurrent connex invariably reaches to 200 for 500 users which should not be the case. Ideally the concurrent connex must be 10. Normally , we run truncate table before the exam starts up. A similar setup(in terms of DB/OS/config etc ) works fine which is actually DR at different site. PS: Network segment between web and DB tier has been thoroughly checked and seems to be fine. Thanks a ton! Best Rgs, Shafi AHMED Sify - Chennai Get your world in your inbox! Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id! Log on to http://www.sify.com ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Technologies Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at ad...@sifycorp.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql -- Thanks Suresh Kuna MySQL DBA -- Thanks Suresh Kuna MySQL DBA
Got timeout reading communication packets
Hello, I am running MySQL 3.23.37-log and I was looking at my .err log file. What I found was a ton of entries like this one: 010709 16:35:01 Aborted connection 1040 to db: 'xsparts' user: 'xsparts_user' host: `localhost' (Got timeout reading communication packets) Any idea what this means? How do I fix this? My platform is FreeBSD 4.2, Apache and PHP 4 for website development stuff... Thanks! Patrick - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Seth Northrop writes: Re: large replaces truncating... I'm still trying to figure out what's going on here.. I've now tried it in PHP and am getting the same response... Ie, given this simple script: cut --- Seth Northrop Manager of Information Technology Reflectivity, Inc. 3910 Freedom Circle, Suite 103 Santa Clara, CA 95054 voice: 408-970-8881 x147 fax:408-970-8840 http://www.reflectivity.com/ How do you know that row is truncated ?? If you have binary data in the blob field, when you retreive a result set, you will get it back in the binary, unescaped form. Query the lengths returned to make sure that data is truncated. If you are sure, send me CREATE TABLE statement and INSERT instead of REPLACE statement, so that I can test it. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Hi! How do you know that row is truncated ?? Filesizes for one. With just this single query the database is ca. 65K, the update log with just this query in it is ~600k. If you have binary data in the blob field, when you retreive a result set, you will get it back in the binary, unescaped form. I can't imagine there is any binary data in there. See the php script in the previous email.. it just increments a counter and stores in a sring. It also reacts the same way with a text field. Also, it's truncating right in the middle of one of the incremented numbers... 12770 12771 12772 12773 1 | Query the lengths returned to make sure that data is truncated. mysql select length(data) from measurement_extended_data; +--+ | length(data) | +--+ |65535 | +--+ 1 row in set (0.05 sec) [internal mysql]# wc /tmp/update.002 4 100046 589227 /tmp/update.002 If you are sure, send me CREATE TABLE statement and INSERT instead of REPLACE statement, so that I can test it. # here's the create statement.. the only thing really abnormal # is the size of the primary key (compound) CREATE TABLE measurement_extended_data ( content_typeID tinyint(3) unsigned NOT NULL default '0', contentID int(10) unsigned NOT NULL default '0', arrayID smallint(5) unsigned NOT NULL default '0', positionID mediumint(8) unsigned NOT NULL default '0', testID smallint(5) unsigned NOT NULL default '0', iteration smallint(5) unsigned NOT NULL default '0', test_locationID smallint(5) unsigned NOT NULL default '0', date_added int(10) unsigned NOT NULL default '0', added_by mediumint(8) unsigned NOT NULL default '0', data text NOT NULL, PRIMARY KEY (content_typeID,contentID,arrayID,positionID,testID,iteration), KEY test_locationID (test_locationID), KEY testID (testID) ) TYPE=MyISAM; Update log attached in seperate email. Take care, seth --- Seth Northrop Manager of Information Technology Reflectivity, Inc. 3910 Freedom Circle, Suite 103 Santa Clara, CA 95054 voice: 408-970-8881 x147 fax:408-970-8840 http://www.reflectivity.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Seth Northrop writes: But.. why would the console be reporting this? Ie, I'm getting the same result (same error in the error log, same truncation) when I manually pipe the query to the mysql console. (Note that the errors are coming from localhost; the actual script is run from a client). Shouldn't a direct console query terminate the connection to the database after proper completion? Checkout your variables. May be some timeout is wrong. May be you did not use our binaries. There is a whole list of possible clauses in our manual. cut The query just looks like: REPLACE into reflectivity.measurement_extended_data set content_typeID = 7, contentID = 121529, arrayID = 0, positionID = 1, testID = 1, iteration = 0, test_locationID = 1, date_added = 993165848, added_by = 18, data = '396 601 12011801,0 191 191 191 191 190 189 188 188 188 188 188 187 191 191 191 191 192 snip/snip; It just happens to be several MB large. Or... are we just having a huge disconnect here? Thanks! Seth Do you get any error message after running the above query through mysql monitor program ?? -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Re: large replaces truncating... I'm still trying to figure out what's going on here.. I've now tried it in PHP and am getting the same response... Ie, given this simple script: ?php // set no time limit (just in case) set_time_limit(0); // build a data array for ($i=0;$i10;$i++) $data .= $i.\t; // build the sql $sql = REPLACE into reflectivity.measurement_extended_data set content_typeID = 1, contentID = 1, arrayID = 1, positionID = 1, testID = 1, iteration = 1, test_locationID = 1, date_added = 1, added_by = 18, data = '.$data.'; // connect to db and execute query mysql_connect('localhost','root'); mysql_query($sql); // return an error if there is one echo mysql_errno().': '.mysql_error().\n; // close the database mysql_close(); ? The data field in the table truncates like this: | snip 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 1 | It always truncates in the exact same location. I can drop the table and recreate but it still truncates in the exact same location. The query, when echoed out is sane ending indeed on 9. Here's the table again: mysql desc measurement_extended_data; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | content_typeID | tinyint(3) unsigned | | PRI | 0 | | | contentID | int(10) unsigned | | PRI | 0 | | | arrayID | smallint(5) unsigned | | PRI | 0 | | | positionID | mediumint(8) unsigned | | PRI | 0 | | | testID | smallint(5) unsigned | | PRI | 0 | | | iteration | smallint(5) unsigned | | PRI | 0 | | | test_locationID | smallint(5) unsigned | | MUL | 0 | | | date_added | int(10) unsigned | | | 0 | | | added_by| mediumint(8) unsigned | | | 0 | | | data| blob | | | | | +-+---+--+-+-+---+ (Note.. I've even tried changing data to a text NOT NULL).. exact same truncation location). The php script above reports no error. ** The UPDATE log (when turned on) shows the ENTIRE query (ie.. the query is at least making it to the database long enough to be logged). Again.. the my.cnf: # MySQL Configuration File # # One can use all long options that the program supports. # Run the program with --help to get a list of available options # This will be passed to all mysql clients [client] port= 3306 socket = /tmp/mysql.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # The MySQL server [mysqld] port= 3306 socket = /tmp/mysql.sock skip-locking set-variable= key_buffer=256M set-variable= max_allowed_packet=7M # INCREASED FOR MORE DATA set-variable= thread_stack=128K set-variable= back_log=50 set-variable= max_connections=2250 set-variable= tmp_table_size=15M set-variable= table_cache=6000 set-variable= sort_buffer=3584K set-variable= join_buffer=512K set-variable= connect_timeout=2 set-variable= record_buffer=1M set-variable= flush_time=900 set-variable= wait_timeout=300 [mysqldump] quick set-variable= max_allowed_packet=16M [mysql] no-auto-rehash [myisamchk] set-variable= key_buffer=32M set-variable= sort_buffer_size=48M Any new ideas? Seth Seth Northrop writes: 010624 19:44:23 Aborted connection 231 to db: 'unconnected' user: 'root' host: `localhost' (Got timeout reading communication packets) The above only implies that your program exited without calling mysql_close(). Nothing to do with your problem. But, as I told you , you did not quote string constants. And shoot out your resulting string to some file for inspection. That might help you find your error. --- Seth Northrop Manager of Information Technology Reflectivity, Inc. 3910 Freedom Circle, Suite 103 Santa Clara, CA 95054 voice: 408-970-8881 x147 fax:408-970-8840 http://www.reflectivity.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Slight correction in the query... The query just looks like: REPLACE into reflectivity.measurement_extended_data set content_typeID = 7, contentID = 121529, arrayID = 0, positionID = 1, testID = 1, iteration = 0, test_locationID = 1, date_added = 993165848, added_by = 18, data = '396 601 12011801,0 191 191 191 191 190 189 188 188 188 188 188 187 191 191 191 191 192 snip/snip' -- --- Seth Northrop Manager of Information Technology Reflectivity, Inc. 3910 Freedom Circle, Suite 103 Santa Clara, CA 95054 voice: 408-970-8881 x147 fax:408-970-8840 http://www.reflectivity.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
The above only implies that your program exited without calling mysql_close(). Nothing to do with your problem. But.. why would the console be reporting this? Ie, I'm getting the same result (same error in the error log, same truncation) when I manually pipe the query to the mysql console. (Note that the errors are coming from localhost; the actual script is run from a client). Shouldn't a direct console query terminate the connection to the database after proper completion? But, as I told you , you did not quote string constants. And shoot out your resulting string to some file for inspection. That might help you find your error. See previous emails.. I've been doing this.. the query looks sane; no \0 characters, no odd binary data, nothing out of whack where it truncates (ie, no renegade ' etc.). Because running the query through the console with no intervention of the c api causes the same result I'm finding it difficult to believe it's an issue with the code itself unless it has something to do with the string itself (ie.. there is some unknown character in there). But, that seems unlikely since the code to generate the query is fairly straight forward.. just dump a bunch of tab delimited ints groups of which comma delimted into a string. The query just looks like: REPLACE into reflectivity.measurement_extended_data set content_typeID = 7, contentID = 121529, arrayID = 0, positionID = 1, testID = 1, iteration = 0, test_locationID = 1, date_added = 993165848, added_by = 18, data = '396 601 12011801,0 191 191 191 191 190 189 188 188 188 188 188 187 191 191 191 191 192 snip/snip; It just happens to be several MB large. Or... are we just having a huge disconnect here? Thanks! Seth - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Got timeout reading communication packets
Hi! I posted this last week, but, haven't seen any replies yet, and, generally, there seems to be a lack of replies in the archives on the Got timeout reading communication packets related issues. Here is the issue again: We have started doing some rather large replace intos and inserts (~3MB) using a client written in C. However, these queries are truncating at around 100k - meaning, it inserts about 100k or so of the blob field.. but, stops and truncates out the rest of the query. There is no error returend by the connection, but, the error log does have errors such as these: 010323 11:15:19 Aborted connection 45 to db: 'unconnected' user: 'root' host: `localhost' (Got timeout reading communication packets) The same occurs if I pipe the query directly to mysql from the command line. No error, but the data field only has about 100k of the data there before it just stops. The table looks like this: # MySQL dump 8.13 # # Host: localhostDatabase: reflectivity # # Server version3.23.35 # # Table structure for table 'measurement_extended_data' # CREATE TABLE measurement_extended_data ( content_typeID tinyint(3) unsigned NOT NULL default '0', contentID int(10) unsigned NOT NULL default '0', arrayID smallint(5) unsigned NOT NULL default '0', positionID mediumint(8) unsigned NOT NULL default '0', testID smallint(5) unsigned NOT NULL default '0', iteration smallint(5) unsigned NOT NULL default '0', test_locationID smallint(5) unsigned NOT NULL default '0', date_added int(10) unsigned NOT NULL default '0', added_by mediumint(8) unsigned NOT NULL default '0', data blob NOT NULL, PRIMARY KEY (content_typeID,contentID,arrayID,positionID,testID,iteration), KEY test_locationID (test_locationID), KEY testID (testID) ) TYPE=MyISAM; Smaller queries work fine. It's just when they seem to be over 1 or 2MB. /etc/my.cnf looks like this: # MySQL Configuration File # # One can use all long options that the program supports. # Run the program with --help to get a list of available options # This will be passed to all mysql clients [client] port= 3306 socket = /tmp/mysql.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # The MySQL server [mysqld] port= 3306 socket = /tmp/mysql.sock skip-locking set-variable= key_buffer=256M set-variable= max_allowed_packet=7096128 set-variable= thread_stack=128K set-variable= back_log=50 set-variable= max_connections=512 set-variable= tmp_table_size=15M set-variable= table_cache=6000 set-variable= sort_buffer=3584K set-variable= join_buffer=512K set-variable= connect_timeout=2 set-variable= record_buffer=1M set-variable= flush_time=900 set-variable= wait_timeout=300 [mysqldump] quick set-variable= max_allowed_packet=16M [mysql] no-auto-rehash [myisamchk] set-variable= key_buffer=32M set-variable= sort_buffer_size=48M As you can see we bumped up the max_allowed_packet because we were getting server has gone away errors. - Box is a 1Ghz XEON /w Redhat 7.2 and 1GB RAM - MySQL version is: 3.23.35 - Query is a fairly straight forward insert or replace into and is verified as clean. Am I missing a configuration directive? Is something else up? Thanks! Seth - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
You are possibly not escaping binary fields. You should use mysql_escape_string() function on binary objects prior to inserting it in the INSERT command, or use load_file() function. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
You are possibly not escaping binary fields. You should use mysql_escape_string() function on binary objects prior to inserting it in the INSERT command, or use load_file() function. Thanks Sinisa for the reply! There really isn't any binary data.. and, we are calling mysql_escape_string.. here is the snippet of code: // START SNIP int state; unsigned int encoded_str_length = 0; MYSQL_RES *result; MYSQL_ROW row; char *sql, *escaped_data; escaped_data = new char[2*strlen(data)+1]; //required by mysql sql = new char[2*strlen(data)+600];// +1 encoded_str_length = mysql_escape_string(escaped_data,data,strlen(data)); sprintf(sql,%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%s%s, REPLACE into reflectivity.measurement_extended_data set content_typeID = ,content_typeID, , contentID = ,contentID, , arrayID = ,arrayID, , positionID = ,positionID, , testID = ,testID, , iteration = ,iteration, , test_locationID = ,test_locationID, , date_added = ,date_added, , added_by = ,added_by, , data = ',escaped_data,'); state = mysql_query(connection,sql); delete [ ] sql; delete [ ] escaped_data; if (state != 0) { Application-MessageBox(mysql_error(connection),NULL,MB_OK); return 0; } // END SNIP And, as I mentioned, if I do something like: bin/mysql -u -p database foo.sql where foo.sql contains the query checked for sanity the exact same result occurs. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Seth Northrop writes: You are possibly not escaping binary fields. You should use mysql_escape_string() function on binary objects prior to inserting it in the INSERT command, or use load_file() function. Thanks Sinisa for the reply! There really isn't any binary data.. and, we are calling mysql_escape_string.. here is the snippet of code: And, as I mentioned, if I do something like: bin/mysql -u -p database foo.sql where foo.sql contains the query checked for sanity the exact same result occurs. At a small glance, your code looks OK. Try looking at resulting string sql in gdb or just print it out to stdout. That might catch your bug. I noted however that you forgot to quote string constants !! MySQL commands lenghts are limited only by max_allowed_packet, which can be extended up to 16 Mb in 3.23 and 4 Gb in 4.0. As you are coding in C++, try using MySQL++. You can use streams tehre, so you do not have to think about possible errors you have made in sprintf(). You can also use quote and escape manipulators for easier programming. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
At a small glance, your code looks OK. Try looking at resulting string sql in gdb or just print it out to stdout. That might catch your bug. Thanks again for the reply. The query looks sane.. As I mentioned, I spit it out to a file and piped it directly to mysql (after inspecting it). At least where it truncates there isn't anything abnormal (the blob is merely a tab delimited string of ints) and the same truncation occurs. MySQL commands lenghts are limited only by max_allowed_packet, which can be extended up to 16 Mb in 3.23 and 4 Gb in 4.0. Nodz.. that's what I thought. This is our setting: set-variable= max_allowed_packet=7096128 Confirmed in variables: | max_allowed_packet | 7095296 It's definately not that big, and, we aren't getting the standard expected errors when you exceed packet size (such as mysql server has gone away). The only clue we have is this: 010624 19:44:23 Aborted connection 231 to db: 'unconnected' user: 'root' host: `localhost' (Got timeout reading communication packets) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Seth Northrop writes: 010624 19:44:23 Aborted connection 231 to db: 'unconnected' user: 'root' host: `localhost' (Got timeout reading communication packets) The above only implies that your program exited without calling mysql_close(). Nothing to do with your problem. But, as I told you , you did not quote string constants. And shoot out your resulting string to some file for inspection. That might help you find your error. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Sorry to suggest this but is it just possible that the 'data' object you are doing a strlen on is not null terminated or in fact contains earlier null characters which are terminating your effort. I have made this mistake several times when using mysql_escape_string. Now to avoid it I just use pointer arithmetic. Seth Northrop wrote: You are possibly not escaping binary fields. You should use mysql_escape_string() function on binary objects prior to inserting it in the INSERT command, or use load_file() function. Thanks Sinisa for the reply! There really isn't any binary data.. and, we are calling mysql_escape_string.. here is the snippet of code: // START SNIP int state; unsigned int encoded_str_length = 0; MYSQL_RES *result; MYSQL_ROW row; char *sql, *escaped_data; escaped_data = new char[2*strlen(data)+1]; //required by mysql sql = new char[2*strlen(data)+600];// +1 encoded_str_length = mysql_escape_string(escaped_data,data,strlen(data)); sprintf(sql,%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%s%s, REPLACE into reflectivity.measurement_extended_data set content_typeID = ,content_typeID, , contentID = ,contentID, , arrayID = ,arrayID, , positionID = ,positionID, , testID = ,testID, , iteration = ,iteration, , test_locationID = ,test_locationID, , date_added = ,date_added, , added_by = ,added_by, , data = ',escaped_data,'); state = mysql_query(connection,sql); delete [ ] sql; delete [ ] escaped_data; if (state != 0) { Application-MessageBox(mysql_error(connection),NULL,MB_OK); return 0; } // END SNIP And, as I mentioned, if I do something like: bin/mysql -u -p database foo.sql where foo.sql contains the query checked for sanity the exact same result occurs. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Got timeout reading communication packets
Seth Northrop writes: 010624 19:44:23 Aborted connection 231 to db: 'unconnected' user: 'root' host: `localhost' (Got timeout reading communication packets) The above only implies that your program exited without calling mysql_close(). Nothing to do with your problem. But, as I told you , you did not quote string constants. And shoot out your resulting string to some file for inspection. That might help you find your error. Recently, we had exactly that error *a lot* .. in the end it was caused by a dodgy 100 MHz switch. Fixed the hardware, the problem went away. Paul Wilson iiNet Ltd - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php