Ruby 1.8.1preview2, running on Debian Linux. Server is WEBrick based,
and the main extensions used are Ruby/ODBC and Ruby/Postgres.
I just tried to put the server in to production (approximately an
exponential increase in users, although it was done at a lower-traffic
time of day) and Ruby decided to hang on me. Here’s the appropriate
line from top:
PID USER RSS WCHAN FLAGS LC STAT %CPU %MEM TIME
COMMAND
16419 se 15M rt_sigsus 40 0 S 0.0 1.7 24:52 server
Although I’m not sure, I think the WCHAN indicates that the process is
blocked waiting for something to happen. What, I don’t know.
I suspect Ruby/ODBC as the culprit, but here are my questions:
What could cause such a hang? Where should I even begin looking?
The process is still sitting there, doing nothing. Is there any
more information I can get out of it before I kill it?
“Nathaniel Talbott” nathaniel@talbott.ws schrieb im Newsbeitrag
news:FCD7172F-2984-11D8-9E0C-000A95CD7A8E@talbott.ws…
Ruby 1.8.1preview2, running on Debian Linux. Server is WEBrick based,
and the main extensions used are Ruby/ODBC and Ruby/Postgres.
I just tried to put the server in to production (approximately an
exponential increase in users, although it was done at a lower-traffic
time of day) and Ruby decided to hang on me. Here’s the appropriate
line from top:
PID USER RSS WCHAN FLAGS LC STAT %CPU %MEM TIME
COMMAND
16419 se 15M rt_sigsus 40 0 S 0.0 1.7 24:52
server
Although I’m not sure, I think the WCHAN indicates that the process is
blocked waiting for something to happen. What, I don’t know.
I suspect Ruby/ODBC as the culprit, but here are my questions:
What could cause such a hang? Where should I even begin looking?
Database transaction deadlocks
The process is still sitting there, doing nothing. Is there any
more information I can get out of it before I kill it?
I can find no evidence that Ruby/ODBC or FreeTDS (which I’m using
Ruby/ODBC to access) use pthreads, although I admittedly do not know
much about how to look. I have no earthly idea whether Ruby/Postgres
uses pthreads, but I suspect it doesn’t.
Nathaniel
<:((><
···
On Dec 8, 2003, at 08:52, ts wrote:
16419 se 15M rt_sigsus 40 0 S 0.0 1.7 24:52
server
I can find no evidence that Ruby/ODBC or FreeTDS (which I’m using
Ruby/ODBC to access) use pthreads, although I admittedly do not know
much about how to look. I have no earthly idea whether Ruby/Postgres
uses pthreads, but I suspect it doesn’t.
OK, it appears that Ruby/ODBC and FreeTDS’s ODBC layer both link to
libpthread (though I don’t really understand why; grepping for pthread
in their source turns up nothing interesting). What does that mean?
Nathaniel
<:((><
···
On Dec 8, 2003, at 09:36, ts wrote:
I can find no evidence that Ruby/ODBC or FreeTDS (which I’m using
Ruby/ODBC to access) use pthreads, although I admittedly do not know
much about how to look. I have no earthly idea whether Ruby/Postgres
uses pthreads, but I suspect it doesn’t.
OK, it appears that Ruby/ODBC and FreeTDS’s ODBC layer both link to
libpthread (though I don’t really understand why; grepping for pthread
in their source turns up nothing interesting). What does that mean?
This mean that it can exist a thread synchronisation problem, and perhaps
it’s best to use the latest CVS version of ruby
OK… do I need to use --with-pthread-ext when I build?
Thanks,
Nathaniel
<:((><
···
On Dec 8, 2003, at 10:03, ts wrote:
OK, it appears that Ruby/ODBC and FreeTDS’s ODBC layer both link to
libpthread (though I don’t really understand why; grepping for
pthread
in their source turns up nothing interesting). What does that mean?
This mean that it can exist a thread synchronisation problem, and
perhaps
it’s best to use the latest CVS version of ruby
Now, can you or someone else help me understand what this option
actually does? And why, if it’s such a problem, it hasn’t showed up
before and it isn’t on by default? Was every extension linked to
pthread before doomed to lock up eventually?
Thanks,
Nathaniel
<:((><
···
On Dec 8, 2003, at 10:23, ts wrote:
OK… do I need to use --with-pthread-ext when I build?