FreeTDS Pylons Problem
Todd Hanson <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
I have set up a Pylons environment on an Ubuntu server which I am using as my platform for distributing my intraweb applications within my organization. I have created a python controller in Pylons which acts as the connection conduit between my web applications and my backend SQL 2000 Server. The python controller is utilizing the python pymssql library (http://pymssql.sourceforge.net/support.html) in conjunction with FreeTDS to make the connection and requests to the SQL Server. This environment works great as long as I only make a single request against the Pylons controller at a time. If simultaneous requests are made against the controller (i.e. request 1 is running and has not returned a result yet and a new request is made against the controller) Pylons blows out completely with a single line error pointing to FreeTDS as the culprit. I have run some tests and found I am able to make simultaneous calls against different Pylon controller names all which are using FreeTDS without an error but as stated above never successfully to the same Pylons controller. I have attached the freetds.log file which does not appear to give a clear error but hopefully will help shed some light on what the problem might be. Thank you for any help and insight you may be able to provide me. Todd _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds
freetds.log
(application/octet-stream, 17.1 KB)
log.c:190:Starting log file for FreeTDS 0.82 on 2009-04-13 10:36:05 with debug flags 0x4fff. iconv.c:363:iconv to convert client-side data to the "ANSI_X3.4-1968" character set iconv.c:516:tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE" net.c:210:Connecting to 172.31.10.16 port 1433 (TDS version 4.2) net.c:264:tds_open_socket: connect(2) returned "Operation now in progress" net.c:303:tds_open_socket() succeeded util.c:162:Changed query state from DEAD to IDLE net.c:779:Sending packet 0000 02 00 02 00 00 00 00 00-31 37 32 2e 33 31 2e 31 |........ 172.31.1| 0010 30 2e 31 36 00 00 00 00-00 00 00 00 00 00 00 00 |0.16.... ........| 0020 00 00 00 00 00 00 0c 73-61 00 00 00 00 00 00 00 |.......s a.......| 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0040 00 00 00 00 00 02 6d 61-63 67 72 65 67 00 00 00 |......ma cgreg...| 0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0060 00 00 00 00 07 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......| 0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0080 00 00 00 05 03 01 06 0a-09 01 00 00 00 00 02 00 |........ ........| 0090 00 00 00 00 70 79 6d 73-73 71 6c 00 00 00 00 00 |....pyms sql.....| 00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 00b0 00 00 07 31 37 32 2e 33-31 2e 31 30 2e 31 36 00 |...172.3 1.10.16.| 00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 00d0 00 0c 6d 61 63 67 72 65-67 00 00 00 00 00 00 00 |..macgre g.......| 00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........| 01d0 00 07 04 02 00 00 44 42-2d 4c 69 62 72 61 72 79 |......DB -Library| 01e0 0a 00 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli| 01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........| net.c:779:Sending packet 0000 02 01 00 4c 00 00 00 00-00 00 00 00 00 00 0a 00 |...L.... ........| 0010 00 00 00 00 00 00 00 00-00 00 00 00 00 41 4e 53 |........ .....ANS| 0020 49 5f 58 33 2e 34 2d 31-39 36 38 00 00 00 00 00 |I_X3.4-1 968.....| 0030 00 00 00 00 00 00 00 00-00 00 00 0e 01 35 31 32 |........ .....512| 0040 00 00 00 03 00 00 00 00-00 00 00 00 |........ ....| token.c:312:tds_process_login_tokens() net.c:592:Received header 0000 04 01 00 9b 00 4b 01 00- |.....K..| net.c:671:Received packet 0000 e3 0f 00 01 06 6d 61 73-74 65 72 06 6d 61 73 74 |.....mas ter.mast| 0010 65 72 ab 39 00 45 16 00-00 02 00 25 00 43 68 61 |er.9.E.. ...%.Cha| 0020 6e 67 65 64 20 64 61 74-61 62 61 73 65 20 63 6f |nged dat abase co| 0030 6e 74 65 78 74 20 74 6f-20 27 6d 61 73 74 65 72 |ntext to 'master| 0040 27 2e 08 43 41 58 49 50-53 56 52 00 00 00 e3 09 |'..CAXIP SVR.....| 0050 00 03 05 63 70 38 35 30-01 01 ad 20 00 01 04 02 |...cp850 ... ....| 0060 00 00 16 4d 69 63 72 6f-73 6f 66 74 20 53 51 4c |...Micro soft SQL| 0070 20 53 65 72 76 65 72 00-00 5f 08 00 ff e3 0a 00 | Server. ._......| 0080 04 03 35 31 32 04 34 30-39 36 fd 00 00 00 00 00 |..512.40 96......| 0090 00 00 00 - |...| token.c:316:looking for login token, got e3(ENVCHANGE) token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE) dblib.c:325:db_env_chg(0xa06ea20, 1, master, master) token.c:316:looking for login token, got ab(INFO) token.c:108:tds_process_default_tokens() marker is ab(INFO) token.c:2451:tds_process_msg() reading message from server token.c:2516:tds_process_msg() calling client msg handler dbutil.c:86:_dblib_handle_info_message(0xa52b560, 0xa06ea20, 0xb684b18c) dbutil.c:87:msgno 5701: "Changed database context to 'master'." token.c:2529:tds_process_msg() returning TDS_SUCCEED token.c:316:looking for login token, got e3(ENVCHANGE) token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE) token.c:2356:server indicated charset change to "cp850" iconv.c:985:setting server single-byte charset to "CP850" iconv.c:516:tds_iconv_info_init: converting "US-ASCII"->"CP850" iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"CP850" dblib.c:325:db_env_chg(0xa06ea20, 3, (0x1), cp850) token.c:316:looking for login token, got ad(LOGINACK) token.c:316:looking for login token, got e3(ENVCHANGE) token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE) dblib.c:325:db_env_chg(0xa06ea20, 4, 4096, 512) token.c:316:looking for login token, got fd(DONE) token.c:108:tds_process_default_tokens() marker is fd(DONE) token.c:2201:tds_process_end: more_results = 0 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2217:tds_process_end() state set to TDS_IDLE token.c:2232: rows_affected = 0 token.c:393:leaving tds_process_login_tokens() returning 1 mem.c:563:tds_free_all_results() util.c:162:Changed query state from IDLE to QUERYING util.c:162:Changed query state from QUERYING to PENDING net.c:779:Sending packet 0000 01 01 00 1b 00 00 00 00-73 65 74 20 74 65 78 74 |........ set text| 0010 73 69 7a 65 20 36 34 35-31 32 20 |size 645 12 | token.c:495:tds_process_tokens(0xa06ea20, 0xb684b2a8, 0xb684b2a4, 0x100) util.c:162:Changed query state from PENDING to READING net.c:592:Received header 0000 04 01 00 11 00 4b 01 00- |.....K..| net.c:671:Received packet 0000 fd 00 00 be 00 00 00 00-00 |........ .| token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 0 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2217:tds_process_end() state set to TDS_IDLE util.c:162:Changed query state from READING to IDLE token.c:2232: rows_affected = 0 util.c:110:logic error: cannot change query state from IDLE to PENDING token.c:495:tds_process_tokens(0xa06ea20, 0xb684b2a8, 0xb684b2a4, 0x100) token.c:498:tds_process_tokens() state is COMPLETED dblib.c:237:dblib_add_connection(0xb2049340, 0xa06ea20) dblib.c:718:dbloginfree(0xa169be0) dblib.c:1243:dbcmd(0xa5a57f0, SET ARITHABORT ON;SET CONCAT_NULL_YIELDS_NULL ON;SET ANSI_NULLS ON;SET ANSI_NULL_DFLT_ON ON;SET ANSI_PADDING ON;SET ANSI_WARNINGS ON;SET ANSI_NULL_DFLT_ON ON;SET CURSOR_CLOSE_ON_COMMIT ON;SET QUOTED_IDENTIFIER ON) dblib.c:1250:dbcmd() bufsz = 0 dblib.c:1298:dbsqlexec(0xa5a57f0) dblib.c:6722:dbsqlsend(0xa5a57f0) mem.c:563:tds_free_all_results() util.c:162:Changed query state from IDLE to QUERYING util.c:162:Changed query state from QUERYING to PENDING net.c:779:Sending packet 0000 01 01 00 dc 00 00 00 00-53 45 54 20 41 52 49 54 |........ SET ARIT| 0010 48 41 42 4f 52 54 20 4f-4e 3b 53 45 54 20 43 4f |HABORT O N;SET CO| 0020 4e 43 41 54 5f 4e 55 4c-4c 5f 59 49 45 4c 44 53 |NCAT_NUL L_YIELDS| 0030 5f 4e 55 4c 4c 20 4f 4e-3b 53 45 54 20 41 4e 53 |_NULL ON ;SET ANS| 0040 49 5f 4e 55 4c 4c 53 20-4f 4e 3b 53 45 54 20 41 |I_NULLS ON;SET A| 0050 4e 53 49 5f 4e 55 4c 4c-5f 44 46 4c 54 5f 4f 4e |NSI_NULL _DFLT_ON| 0060 20 4f 4e 3b 53 45 54 20-41 4e 53 49 5f 50 41 44 | ON;SET ANSI_PAD| 0070 44 49 4e 47 20 4f 4e 3b-53 45 54 20 41 4e 53 49 |DING ON; SET ANSI| 0080 5f 57 41 52 4e 49 4e 47-53 20 4f 4e 3b 53 45 54 |_WARNING S ON;SET| 0090 20 41 4e 53 49 5f 4e 55-4c 4c 5f 44 46 4c 54 5f | ANSI_NU LL_DFLT_| 00a0 4f 4e 20 4f 4e 3b 53 45-54 20 43 55 52 53 4f 52 |ON ON;SE T CURSOR| 00b0 5f 43 4c 4f 53 45 5f 4f-4e 5f 43 4f 4d 4d 49 54 |_CLOSE_O N_COMMIT| 00c0 20 4f 4e 3b 53 45 54 20-51 55 4f 54 45 44 5f 49 | ON;SET QUOTED_I| 00d0 44 45 4e 54 49 46 49 45-52 20 4f 4e |DENTIFIE R ON| dblib.c:4532:dbsqlok(0xa5a57f0) net.c:592:Received header 0000 04 01 00 50 00 4b 01 00- |...P.K..| net.c:671:Received packet 0000 fd 01 00 b9 00 00 00 00-00 fd 01 00 b9 00 00 00 |........ ........| 0010 00 00 fd 01 00 b9 00 00-00 00 00 fd 01 00 b9 00 |........ ........| 0020 00 00 00 00 fd 01 00 b9-00 00 00 00 00 fd 01 00 |........ ........| 0030 b9 00 00 00 00 00 fd 01-00 b9 00 00 00 00 00 fd |........ ........| 0040 00 00 b9 00 00 00 00 00- |........| dblib.c:4565:dbsqlok() not done, calling tds_process_tokens() token.c:495:tds_process_tokens(0xa06ea20, 0xb684b5b4, 0xb684b5b8, 0x6914) util.c:162:Changed query state from PENDING to READING token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 1 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2232: rows_affected = 0 util.c:162:Changed query state from READING to PENDING dblib.c:4601:dbsqlok() end status was success dblib.c:3093:dbcancel(0xa5a57f0) query.c:1934:tds_send_cancel: not in_cancel and not idle query.c:1943:tds_send_cancel: sending cancel packet net.c:779:Sending packet 0000 06 01 00 08 00 00 00 00- |........| token.c:495:tds_process_tokens(0xa06ea20, 0xb684b598, (nil), 0x0) util.c:162:Changed query state from PENDING to READING token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 1 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2232: rows_affected = 0 token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 1 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2232: rows_affected = 0 token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 1 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2232: rows_affected = 0 token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 1 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2232: rows_affected = 0 token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 1 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2232: rows_affected = 0 token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 1 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2232: rows_affected = 0 token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 0 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2232: rows_affected = 0 net.c:592:Received header 0000 04 01 00 11 00 4b 01 00- |.....K..| net.c:671:Received packet 0000 fd 20 00 fd 00 00 00 00-00 |. ...... .| token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 0 was_cancelled = 1 error = 0 done_count_valid = 0 token.c:2217:tds_process_end() state set to TDS_IDLE util.c:162:Changed query state from READING to IDLE token.c:2232: rows_affected = 0 dblib.c:1243:dbcmd(0xa5a57f0, USE [QISmaster]) dblib.c:1250:dbcmd() bufsz = 213 dblib.c:5727:dbfreebuf(0xa5a57f0) dblib.c:1298:dbsqlexec(0xa5a57f0) dblib.c:6722:dbsqlsend(0xa5a57f0) mem.c:563:tds_free_all_results() util.c:162:Changed query state from IDLE to QUERYING util.c:162:Changed query state from QUERYING to PENDING net.c:779:Sending packet 0000 01 01 00 17 00 00 00 00-55 53 45 20 5b 51 49 53 |........ USE [QIS| 0010 6d 61 73 74 65 72 5d - |master]| dblib.c:4532:dbsqlok(0xa5a57f0) net.c:592:Received header 0000 04 01 00 65 00 4b 01 00- |...e.K..| net.c:671:Received packet 0000 e3 12 00 01 09 51 49 53-6d 61 73 74 65 72 06 6d |.....QIS master.m| 0010 61 73 74 65 72 ab 3c 00-45 16 00 00 01 00 28 00 |aster.<. E.....(.| 0020 43 68 61 6e 67 65 64 20-64 61 74 61 62 61 73 65 |Changed database| 0030 20 63 6f 6e 74 65 78 74-20 74 6f 20 27 51 49 53 | context to 'QIS| 0040 6d 61 73 74 65 72 27 2e-08 43 41 58 49 50 53 56 |master'. .CAXIPSV| 0050 52 00 01 00 fd 00 00 e2-00 00 00 00 00 |R....... .....| dblib.c:4565:dbsqlok() not done, calling tds_process_tokens() token.c:495:tds_process_tokens(0xa06ea20, 0xb684b4e4, 0xb684b4e8, 0x6914) util.c:162:Changed query state from PENDING to READING token.c:510:processing result tokens. marker is e3(ENVCHANGE) token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE) dblib.c:325:db_env_chg(0xa06ea20, 1, master, QISmaster) token.c:510:processing result tokens. marker is ab(INFO) token.c:108:tds_process_default_tokens() marker is ab(INFO) token.c:2451:tds_process_msg() reading message from server token.c:2516:tds_process_msg() calling client msg handler dbutil.c:86:_dblib_handle_info_message(0xa52b560, 0xa06ea20, 0xb684b34c) dbutil.c:87:msgno 5701: "Changed database context to 'QISmaster'." token.c:2529:tds_process_msg() returning TDS_SUCCEED token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 0 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2217:tds_process_end() state set to TDS_IDLE util.c:162:Changed query state from READING to IDLE token.c:2232: rows_affected = 0 util.c:110:logic error: cannot change query state from IDLE to PENDING dblib.c:4601:dbsqlok() end status was success dblib.c:3093:dbcancel(0xa5a57f0) query.c:1934:tds_send_cancel: not in_cancel and idle dblib.c:3093:dbcancel(0xa5a57f0) query.c:1934:tds_send_cancel: not in_cancel and idle dblib.c:1243:dbcmd(0xa5a57f0, BEGIN TRAN) dblib.c:1250:dbcmd() bufsz = 16 dblib.c:5727:dbfreebuf(0xa5a57f0) dblib.c:1298:dbsqlexec(0xa5a57f0) dblib.c:6722:dbsqlsend(0xa5a57f0) mem.c:563:tds_free_all_results() util.c:162:Changed query state from IDLE to QUERYING util.c:162:Changed query state from QUERYING to PENDING net.c:779:Sending packet 0000 01 01 00 12 00 00 00 00-42 45 47 49 4e 20 54 52 |........ BEGIN TR| 0010 41 4e - |AN| dblib.c:4532:dbsqlok(0xa5a57f0) net.c:592:Received header 0000 04 01 00 11 00 4b 01 00- |.....K..| net.c:671:Received packet 0000 fd 00 00 d4 00 00 00 00-00 |........ .| dblib.c:4565:dbsqlok() not done, calling tds_process_tokens() token.c:495:tds_process_tokens(0xa06ea20, 0xb684b004, 0xb684b008, 0x6914) util.c:162:Changed query state from PENDING to READING token.c:510:processing result tokens. marker is fd(DONE) token.c:2201:tds_process_end: more_results = 0 was_cancelled = 0 error = 0 done_count_valid = 0 token.c:2217:tds_process_end() state set to TDS_IDLE util.c:162:Changed query state from READING to IDLE token.c:2232: rows_affected = 0 util.c:110:logic error: cannot change query state from IDLE to PENDING dblib.c:4601:dbsqlok() end status was success dblib.c:1599:dbresults(0xa5a57f0) dblib.c:1608:dbresults: dbresults_state is 5 (_DB_RES_SUCCEED) dblib.c:1587:dbresults returning 1 (SUCCEED) dblib.c:2678:dbcount(0xa5a57f0) dblib.c:3093:dbcancel(0xa5a57f0) query.c:1934:tds_send_cancel: not in_cancel and idle dblib.c:1372:dbclose(0xa52f3b8) dblib.c:256:dblib_del_connection(0xb2049340, 0xa361058) mem.c:563:tds_free_all_results() util.c:162:Changed query state from PENDING to DEAD dblib.c:303:dblib_release_tds_ctx(1) dblib.c:5727:dbfreebuf(0xa52f3b8) dblib.c:3093:dbcancel(0xa5a57f0) query.c:1934:tds_send_cancel: not in_cancel and idle dblib.c:1243:dbcmd(0xa5a57f0, exec qisxml_GetDailyCustodianStatus;) dblib.c:1250:dbcmd() bufsz = 11 dblib.c:5727:dbfreebuf(0xa5a57f0) dblib.c:1298:dbsqlexec(0xa5a57f0) dblib.c:6722:dbsqlsend(0xa5a57f0) mem.c:563:tds_free_all_results() util.c:162:Changed query state from IDLE to QUERYING util.c:162:Changed query state from QUERYING to PENDING net.c:779:Sending packet 0000 01 01 00 2c 00 00 00 00-65 78 65 63 20 71 69 73 |...,.... exec qis| 0010 78 6d 6c 5f 47 65 74 44-61 69 6c 79 43 75 73 74 |xml_GetD ailyCust| 0020 6f 64 69 61 6e 53 74 61-74 75 73 3b |odianSta tus;| dblib.c:4532:dbsqlok(0xa5a57f0) util.c:334:tdserror(0xa52b560, 0xa361058, 20004, 9) dblib.c:7782:dbperror(0xa52f3b8, 20004, 9) dblib.c:7835:20004: "Read from the server failed" dblib.c:7856:"Read from the server failed", client returns 2 (INT_CANCEL) util.c:368:tdserror: client library returned TDS_INT_CANCEL(2) util.c:389:tdserror: returning TDS_INT_CANCEL(2) dblib.c:4565:dbsqlok() not done, calling tds_process_tokens() token.c:495:tds_process_tokens(0xa361058, 0xb704c644, 0xb704c648, 0x6914) util.c:118:logic error: cannot change query state from DEAD to READING dblib.c:3093:dbcancel(0xa52f3b8) query.c:1934:tds_send_cancel: in_cancel and not idle dblib.c:1599:dbresults(0xa52f3b8) dblib.c:1608:dbresults: dbresults_state is 0 (_DB_RES_INIT) token.c:495:tds_process_tokens(0xb80712c0, 0xb704c678, 0xb704c674, 0x6914)