![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
SQL Anywhere Network Server Version 11.0.1.2250 Advanced edition 16 logical processor(s) on 4 physical processor(s) detected. Running Windows 2003 Build 3790 Service Pack 2 on X86 (X86_64) Server built for X86 processor architecture 25165824K of memory used for caching Physical memory allocated for images: 24883928K Address space allocated: 1237664K Using a maximum page size of 8192 bytes Handler for event 'OurEventNameGoHere' caused SQLSTATE '40W06' All threads are blocked Probable cause You attempted to read or write a row and it is locked by another user. Also, all other threads (see the -gn server option) are blocked waiting for a lock to be released. This is a deadlock situation and your transaction has been chosen as the one to rollback. We reboot our server to make sure that there is no other connection on our system. We verified that there is no other connection running before this fail event occurred. Therefore there is no blocking going on. The event was running fine in version 10. Right after we converted to version 11 this event has been getting SQLSTATE '40W06' error. We're stuck at this point.....any help would be greatly appreciate. SELECT NUMBER(*) AS "#", Name, UserId, Number, BlockedOn FROM sa_conn_info() AS conn1 WHERE BlockedOn <> 0 OR EXISTS ( SELECT * FROM sa_conn_info() AS conn2 WHERE conn2.BlockedOn = conn1.Number ) Best regards, Rachan Terrell |
#3
| |||
| |||
|
|
Hi Rachan, The first thing you can try is to run the server with the -zl switch and set the log_deadlocks option: set option public.log_deadlocks = 'On'; After the deadlock has occurred (but while the server is still running), run the sa_report_deadlocks() system procedure - this will show you all the threads that were active when the deadlock was detected and what they were doing. If this doesn't give you enough information to find the cause, you can run Application Profiling - it may supply more context that will help you understand what is using all of those threads. If you're not familiar with it, see http://www.sybase.com/detail?id=1060302. Also, make sure you are running with a reasonable value of -gn, if you've changed it for any reason. (For a 16-core machine, reasonable would be 20 (the default) or higher). -Dan "Rachan Terrell" <Rachan.Terrell (AT) Stanleyassociates (DOT) com> wrote in message news:4a8c1849 (AT) forums-1-dub (DOT) .. SQL Anywhere Network Server Version 11.0.1.2250 Advanced edition 16 logical processor(s) on 4 physical processor(s) detected. Running Windows 2003 Build 3790 Service Pack 2 on X86 (X86_64) Server built for X86 processor architecture 25165824K of memory used for caching Physical memory allocated for images: 24883928K Address space allocated: 1237664K Using a maximum page size of 8192 bytes Handler for event 'OurEventNameGoHere' caused SQLSTATE '40W06' All threads are blocked Probable cause You attempted to read or write a row and it is locked by another user. Also, all other threads (see the -gn server option) are blocked waiting for a lock to be released. This is a deadlock situation and your transaction has been chosen as the one to rollback. We reboot our server to make sure that there is no other connection on our system. We verified that there is no other connection running before this fail event occurred. Therefore there is no blocking going on. The event was running fine in version 10. Right after we converted to version 11 this event has been getting SQLSTATE '40W06' error. We're stuck at this point.....any help would be greatly appreciate. SELECT NUMBER(*) AS "#", Name, UserId, Number, BlockedOn FROM sa_conn_info() AS conn1 WHERE BlockedOn <> 0 OR EXISTS ( SELECT * FROM sa_conn_info() AS conn2 WHERE conn2.BlockedOn = conn1.Number ) Best regards, Rachan Terrell |
#4
| |||
| |||
|
|
Dan, Thank you very much for your respond. We have create this event and did not see any deadlock....We do not have -gn option set therefore it have 20 threads as default. We added -gn and set it to 50 and it's working now. Again, thank you very much for your helps. Still does not understand why with version 10 we can run it with 20 threads and now with version 11 we need to change it to 50 ?????? CREATE EVENT ev_SetOption_DatabaseStart TYPE DatabaseStart HANDLER BEGIN MESSAGE 'ev_SetOption_DatabaseStart event starting: ' || now(*) to console; SET OPTION PUBLIC.log_deadlocks = 'ON'; SET OPTION PUBLIC.max_recursive_iterations = 5000; SET OPTION PUBLIC.max_cursor_count = 100; CALL sa_server_option( 'RememberLastStatement', 'YES' ); MESSAGE 'ev_SetOption_DatabaseStart event completed: ' || now(*) to console END; Best regards, Rachan Terrell "Dan Farrar [Sybase iAnywhere]" <farrard (AT) ianywhere (DOT) com> wrote in message news:4a8c4e63$1 (AT) forums-1-dub (DOT) .. Hi Rachan, The first thing you can try is to run the server with the -zl switch and set the log_deadlocks option: set option public.log_deadlocks = 'On'; After the deadlock has occurred (but while the server is still running), run the sa_report_deadlocks() system procedure - this will show you all the threads that were active when the deadlock was detected and what they were doing. If this doesn't give you enough information to find the cause, you can run Application Profiling - it may supply more context that will help you understand what is using all of those threads. If you're not familiar with it, see http://www.sybase.com/detail?id=1060302. Also, make sure you are running with a reasonable value of -gn, if you've changed it for any reason. (For a 16-core machine, reasonable would be 20 (the default) or higher). -Dan "Rachan Terrell" <Rachan.Terrell (AT) Stanleyassociates (DOT) com> wrote in message news:4a8c1849 (AT) forums-1-dub (DOT) .. SQL Anywhere Network Server Version 11.0.1.2250 Advanced edition 16 logical processor(s) on 4 physical processor(s) detected. Running Windows 2003 Build 3790 Service Pack 2 on X86 (X86_64) Server built for X86 processor architecture 25165824K of memory used for caching Physical memory allocated for images: 24883928K Address space allocated: 1237664K Using a maximum page size of 8192 bytes Handler for event 'OurEventNameGoHere' caused SQLSTATE '40W06' All threads are blocked Probable cause You attempted to read or write a row and it is locked by another user. Also, all other threads (see the -gn server option) are blocked waiting for a lock to be released. This is a deadlock situation and your transaction has been chosen as the one to rollback. We reboot our server to make sure that there is no other connection on our system. We verified that there is no other connection running before this fail event occurred. Therefore there is no blocking going on. The event was running fine in version 10. Right after we converted to version 11 this event has been getting SQLSTATE '40W06' error. We're stuck at this point.....any help would be greatly appreciate. SELECT NUMBER(*) AS "#", Name, UserId, Number, BlockedOn FROM sa_conn_info() AS conn1 WHERE BlockedOn <> 0 OR EXISTS ( SELECT * FROM sa_conn_info() AS conn2 WHERE conn2.BlockedOn = conn1.Number ) Best regards, Rachan Terrell |
#5
| |||
| |||
|
|
Neither do I; this is something that deserves investigation, since one should not require 50 tasks. If you set -gn to a smaller number (10?) it might help to better pinpoint the problem. What is the output of sa_report_deadlocks() in that case? Glenn Rachan Terrell wrote: Dan, Thank you very much for your respond. We have create this event and did not see any deadlock....We do not have -gn option set therefore it have 20 threads as default. We added -gn and set it to 50 and it's working now. Again, thank you very much for your helps. Still does not understand why with version 10 we can run it with 20 threads and now with version 11 we need to change it to 50 ?????? CREATE EVENT ev_SetOption_DatabaseStart TYPE DatabaseStart HANDLER BEGIN MESSAGE 'ev_SetOption_DatabaseStart event starting: ' || now(*) to console; SET OPTION PUBLIC.log_deadlocks = 'ON'; SET OPTION PUBLIC.max_recursive_iterations = 5000; SET OPTION PUBLIC.max_cursor_count = 100; CALL sa_server_option( 'RememberLastStatement', 'YES' ); MESSAGE 'ev_SetOption_DatabaseStart event completed: ' || now(*) to console END; Best regards, Rachan Terrell "Dan Farrar [Sybase iAnywhere]" <farrard (AT) ianywhere (DOT) com> wrote in message news:4a8c4e63$1 (AT) forums-1-dub (DOT) .. Hi Rachan, The first thing you can try is to run the server with the -zl switch and set the log_deadlocks option: set option public.log_deadlocks = 'On'; After the deadlock has occurred (but while the server is still running), run the sa_report_deadlocks() system procedure - this will show you all the threads that were active when the deadlock was detected and what they were doing. If this doesn't give you enough information to find the cause, you can run Application Profiling - it may supply more context that will help you understand what is using all of those threads. If you're not familiar with it, see http://www.sybase.com/detail?id=1060302. Also, make sure you are running with a reasonable value of -gn, if you've changed it for any reason. (For a 16-core machine, reasonable would be 20 (the default) or higher). -Dan "Rachan Terrell" <Rachan.Terrell (AT) Stanleyassociates (DOT) com> wrote in message news:4a8c1849 (AT) forums-1-dub (DOT) .. SQL Anywhere Network Server Version 11.0.1.2250 Advanced edition 16 logical processor(s) on 4 physical processor(s) detected. Running Windows 2003 Build 3790 Service Pack 2 on X86 (X86_64) Server built for X86 processor architecture 25165824K of memory used for caching Physical memory allocated for images: 24883928K Address space allocated: 1237664K Using a maximum page size of 8192 bytes Handler for event 'OurEventNameGoHere' caused SQLSTATE '40W06' All threads are blocked Probable cause You attempted to read or write a row and it is locked by another user. Also, all other threads (see the -gn server option) are blocked waiting for a lock to be released. This is a deadlock situation and your transaction has been chosen as the one to rollback. We reboot our server to make sure that there is no other connection on our system. We verified that there is no other connection running before this fail event occurred. Therefore there is no blocking going on. The event was running fine in version 10. Right after we converted to version 11 this event has been getting SQLSTATE '40W06' error. We're stuck at this point.....any help would be greatly appreciate. SELECT NUMBER(*) AS "#", Name, UserId, Number, BlockedOn FROM sa_conn_info() AS conn1 WHERE BlockedOn <> 0 OR EXISTS ( SELECT * FROM sa_conn_info() AS conn2 WHERE conn2.BlockedOn = conn1.Number ) Best regards, Rachan Terrell -- Glenn Paulley Director, Engineering (Query Processing) Sybase iAnywhere Blog: http://iablog.sybase.com/paulley EBF's and Patches: http://downloads.sybase.com choose SQL Anywhere Studio >> change 'time frame' to all To Submit Bug Reports: http://case-express.sybase.com SQL Anywhere Studio Supported Platforms and Support Status http://my.sybase.com/detail?id=1002288 Whitepapers, TechDocs, and bug fixes are all available through the Sybase iAnywhere pages at http://www.sybase.com/products/datab...chnicalsupport |
#6
| |||
| |||
|
|
Glenn, There were no deadlocks occured. We have an event that monitoring the deadlock and it got exectued around 8:00 PM so we know that the monitor event work. We reboot the server before we start the event that was giving us this error: SQLSTATE '40W06' and the monitor was running but no deadlock. Best regards, Rachan Terrell "Glenn Paulley [Sybase iAnywhere]" <paulley (AT) ianywhere (DOT) com> wrote in message news:4a8c5796$3 (AT) forums-1-dub (DOT) .. Neither do I; this is something that deserves investigation, since one should not require 50 tasks. If you set -gn to a smaller number (10?) it might help to better pinpoint the problem. What is the output of sa_report_deadlocks() in that case? Glenn Rachan Terrell wrote: Dan, Thank you very much for your respond. We have create this event and did not see any deadlock....We do not have -gn option set therefore it have 20 threads as default. We added -gn and set it to 50 and it's working now. Again, thank you very much for your helps. Still does not understand why with version 10 we can run it with 20 threads and now with version 11 we need to change it to 50 ?????? CREATE EVENT ev_SetOption_DatabaseStart TYPE DatabaseStart HANDLER BEGIN MESSAGE 'ev_SetOption_DatabaseStart event starting: ' || now(*) to console; SET OPTION PUBLIC.log_deadlocks = 'ON'; SET OPTION PUBLIC.max_recursive_iterations = 5000; SET OPTION PUBLIC.max_cursor_count = 100; CALL sa_server_option( 'RememberLastStatement', 'YES' ); MESSAGE 'ev_SetOption_DatabaseStart event completed: ' || now(*) to console END; Best regards, Rachan Terrell "Dan Farrar [Sybase iAnywhere]" <farrard (AT) ianywhere (DOT) com> wrote in message news:4a8c4e63$1 (AT) forums-1-dub (DOT) .. Hi Rachan, The first thing you can try is to run the server with the -zl switch and set the log_deadlocks option: set option public.log_deadlocks = 'On'; After the deadlock has occurred (but while the server is still running), run the sa_report_deadlocks() system procedure - this will show you all the threads that were active when the deadlock was detected and what they were doing. If this doesn't give you enough information to find the cause, you can run Application Profiling - it may supply more context that will help you understand what is using all of those threads. If you're not familiar with it, see http://www.sybase.com/detail?id=1060302. Also, make sure you are running with a reasonable value of -gn, if you've changed it for any reason. (For a 16-core machine, reasonable would be 20 (the default) or higher). -Dan "Rachan Terrell" <Rachan.Terrell (AT) Stanleyassociates (DOT) com> wrote in message news:4a8c1849 (AT) forums-1-dub (DOT) .. SQL Anywhere Network Server Version 11.0.1.2250 Advanced edition 16 logical processor(s) on 4 physical processor(s) detected. Running Windows 2003 Build 3790 Service Pack 2 on X86 (X86_64) Server built for X86 processor architecture 25165824K of memory used for caching Physical memory allocated for images: 24883928K Address space allocated: 1237664K Using a maximum page size of 8192 bytes Handler for event 'OurEventNameGoHere' caused SQLSTATE '40W06' All threads are blocked Probable cause You attempted to read or write a row and it is locked by another user. Also, all other threads (see the -gn server option) are blocked waiting for a lock to be released. This is a deadlock situation and your transaction has been chosen as the one to rollback. We reboot our server to make sure that there is no other connection on our system. We verified that there is no other connection running before this fail event occurred. Therefore there is no blocking going on. The event was running fine in version 10. Right after we converted to version 11 this event has been getting SQLSTATE '40W06' error. We're stuck at this point.....any help would be greatly appreciate. SELECT NUMBER(*) AS "#", Name, UserId, Number, BlockedOn FROM sa_conn_info() AS conn1 WHERE BlockedOn <> 0 OR EXISTS ( SELECT * FROM sa_conn_info() AS conn2 WHERE conn2.BlockedOn = conn1.Number ) Best regards, Rachan Terrell -- Glenn Paulley Director, Engineering (Query Processing) Sybase iAnywhere Blog: http://iablog.sybase.com/paulley EBF's and Patches: http://downloads.sybase.com choose SQL Anywhere Studio >> change 'time frame' to all To Submit Bug Reports: http://case-express.sybase.com SQL Anywhere Studio Supported Platforms and Support Status http://my.sybase.com/detail?id=1002288 Whitepapers, TechDocs, and bug fixes are all available through the Sybase iAnywhere pages at http://www.sybase.com/products/datab...chnicalsupport |
#7
| |||
| |||
|
|
Rachan, Does your application use any of the following: -Remote data access (proxy tables)? -External environments (Java / PHP / CLR stored procedures)? -Web services (running SQL Anywhere as an HTTP server)? -Dan "Rachan Terrell" <Rachan.Terrell (AT) Stanleyassociates (DOT) com> wrote in message news:4a8c62e2$5 (AT) forums-1-dub (DOT) .. Glenn, There were no deadlocks occured. We have an event that monitoring the deadlock and it got exectued around 8:00 PM so we know that the monitor event work. We reboot the server before we start the event that was giving us this error: SQLSTATE '40W06' and the monitor was running but no deadlock. Best regards, Rachan Terrell "Glenn Paulley [Sybase iAnywhere]" <paulley (AT) ianywhere (DOT) com> wrote in message news:4a8c5796$3 (AT) forums-1-dub (DOT) .. Neither do I; this is something that deserves investigation, since one should not require 50 tasks. If you set -gn to a smaller number (10?) it might help to better pinpoint the problem. What is the output of sa_report_deadlocks() in that case? Glenn Rachan Terrell wrote: Dan, Thank you very much for your respond. We have create this event and did not see any deadlock....We do not have -gn option set therefore it have 20 threads as default. We added -gn and set it to 50 and it's working now. Again, thank you very much for your helps. Still does not understand why with version 10 we can run it with 20 threads and now with version 11 we need to change it to 50 ?????? CREATE EVENT ev_SetOption_DatabaseStart TYPE DatabaseStart HANDLER BEGIN MESSAGE 'ev_SetOption_DatabaseStart event starting: ' || now(*) to console; SET OPTION PUBLIC.log_deadlocks = 'ON'; SET OPTION PUBLIC.max_recursive_iterations = 5000; SET OPTION PUBLIC.max_cursor_count = 100; CALL sa_server_option( 'RememberLastStatement', 'YES' ); MESSAGE 'ev_SetOption_DatabaseStart event completed: ' || now(*) to console END; Best regards, Rachan Terrell "Dan Farrar [Sybase iAnywhere]" <farrard (AT) ianywhere (DOT) com> wrote in message news:4a8c4e63$1 (AT) forums-1-dub (DOT) .. Hi Rachan, The first thing you can try is to run the server with the -zl switch and set the log_deadlocks option: set option public.log_deadlocks = 'On'; After the deadlock has occurred (but while the server is still running), run the sa_report_deadlocks() system procedure - this will show you all the threads that were active when the deadlock was detected and what they were doing. If this doesn't give you enough information to find the cause, you can run Application Profiling - it may supply more context that will help you understand what is using all of those threads. If you're not familiar with it, see http://www.sybase.com/detail?id=1060302. Also, make sure you are running with a reasonable value of -gn, if you've changed it for any reason. (For a 16-core machine, reasonable would be 20 (the default) or higher). -Dan "Rachan Terrell" <Rachan.Terrell (AT) Stanleyassociates (DOT) com> wrote in message news:4a8c1849 (AT) forums-1-dub (DOT) .. SQL Anywhere Network Server Version 11.0.1.2250 Advanced edition 16 logical processor(s) on 4 physical processor(s) detected. Running Windows 2003 Build 3790 Service Pack 2 on X86 (X86_64) Server built for X86 processor architecture 25165824K of memory used for caching Physical memory allocated for images: 24883928K Address space allocated: 1237664K Using a maximum page size of 8192 bytes Handler for event 'OurEventNameGoHere' caused SQLSTATE '40W06' All threads are blocked Probable cause You attempted to read or write a row and it is locked by another user. Also, all other threads (see the -gn server option) are blocked waiting for a lock to be released. This is a deadlock situation and your transaction has been chosen as the one to rollback. We reboot our server to make sure that there is no other connection on our system. We verified that there is no other connection running before this fail event occurred. Therefore there is no blocking going on. The event was running fine in version 10. Right after we converted to version 11 this event has been getting SQLSTATE '40W06' error. We're stuck at this point.....any help would be greatly appreciate. SELECT NUMBER(*) AS "#", Name, UserId, Number, BlockedOn FROM sa_conn_info() AS conn1 WHERE BlockedOn <> 0 OR EXISTS ( SELECT * FROM sa_conn_info() AS conn2 WHERE conn2.BlockedOn = conn1.Number ) Best regards, Rachan Terrell -- Glenn Paulley Director, Engineering (Query Processing) Sybase iAnywhere Blog: http://iablog.sybase.com/paulley EBF's and Patches: http://downloads.sybase.com choose SQL Anywhere Studio >> change 'time frame' to all To Submit Bug Reports: http://case-express.sybase.com SQL Anywhere Studio Supported Platforms and Support Status http://my.sybase.com/detail?id=1002288 Whitepapers, TechDocs, and bug fixes are all available through the Sybase iAnywhere pages at http://www.sybase.com/products/datab...chnicalsupport |
![]() |
| Thread Tools | |
| Display Modes | |
| |