Zero content length, only affecting one rails app, out of nowhere

inspirix

Active Member
#1
I have no idea what is going on with one of my rails apps. The only thing Ive done was upgrade ruby-lsapi to 1.13 recently. All of the sudden at 11:30 today one of my apps is just completely inaccessible, very odd. Nothing in stderr.log, and definitely different output in debug mode when I try to access this site vs other working rails apps.

I will attempt to downgrade back to 1.12 since I cant think of anything that could cause this. I am still running 2.2.6 (if I should go the 3 beta let me know). Any help would be greatly appreciated.

This is me trying to access http://www.notarydepot.com/notary/joenoon (greping only lines by my ip) once by http, once by https

Code:
[root@web ~]# tail -f /usr/local/lsws/logs/error.log | grep "67.188.175.53"
2007-01-21 15:07:22.435 [DEBUG] [*:80] New connection from 67.188.175.53:56389.
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0] HttpIOLink::handleEvents() events=1!
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0] HttpConnection::onReadEx(), state: 0!
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0] readToHeaderBuf(). 
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0] Read from client: 544
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0] read 544 bytes to header buffer
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0] processHeader() return 0, header state: 3. 
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0] readToHeaderBuf() return 0. 
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0#notarydepot] New request: 
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0#notarydepot] Find context with URI: [/], location: [/sites/notarydepot/releases/20070120201933/public/]
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0#notarydepot] processContextPath() return 0
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0#notarydepot] readyCacheData() return 0
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0#notarydepot] HttpConnection::flush()!
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0#notarydepot] Written to client: 134
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-0#notarydepot] HttpConnection::nextRequest()!
2007-01-21 15:07:22.435 [DEBUG] [67.188.175.53:56389-1] processNewReq() return 0. 
2007-01-21 15:07:27.412 [DEBUG] [67.188.175.53:56389-1] Keep-alive timeout, close!
2007-01-21 15:07:27.412 [DEBUG] [67.188.175.53:56389-1] Close socket ...
2007-01-21 15:07:34.865 [DEBUG] [72.9.103.122:443] New connection from 67.188.175.53:56390.
2007-01-21 15:07:34.865 [DEBUG] [67.188.175.53:56390-0] HttpIOLink::handleEvents() events=1!
2007-01-21 15:07:34.865 [DEBUG] [67.188.175.53:56390-0] [SSL] SSLAgain()!
2007-01-21 15:07:34.975 [DEBUG] [67.188.175.53:56390-0] HttpIOLink::handleEvents() events=1!
2007-01-21 15:07:34.975 [DEBUG] [67.188.175.53:56390-0] [SSL] SSLAgain()!
2007-01-21 15:07:34.979 [DEBUG] [67.188.175.53:56390-0] [SSL] accepted!
2007-01-21 15:07:35.076 [DEBUG] [67.188.175.53:56390-0] HttpIOLink::handleEvents() events=1!
2007-01-21 15:07:35.076 [DEBUG] [67.188.175.53:56390-0] HttpConnection::onReadEx(), state: 0!
2007-01-21 15:07:35.076 [DEBUG] [67.188.175.53:56390-0] readToHeaderBuf(). 
2007-01-21 15:07:35.076 [DEBUG] [67.188.175.53:56390-0] read 432 bytes to header buffer
2007-01-21 15:07:35.076 [DEBUG] [67.188.175.53:56390-0] processHeader() return 0, header state: 3. 
2007-01-21 15:07:35.076 [DEBUG] [67.188.175.53:56390-0] readToHeaderBuf() return 0. 
2007-01-21 15:07:35.076 [DEBUG] [67.188.175.53:56390-0#notarydepot] New request: 
2007-01-21 15:07:35.076 [DEBUG] [67.188.175.53:56390-0#notarydepot] Find context with URI: [/], location: [/sites/notarydepot/releases/20070120201933/public/]
2007-01-21 15:07:35.077 [DEBUG] [67.188.175.53:56390-0#notarydepot] processContextPath() return 0
2007-01-21 15:07:35.077 [DEBUG] [67.188.175.53:56390-0#notarydepot] readyCacheData() return 0
2007-01-21 15:07:35.077 [DEBUG] [67.188.175.53:56390-0#notarydepot] m_pHandler->onWrite() return 0
2007-01-21 15:07:35.077 [DEBUG] [67.188.175.53:56390-0#notarydepot] HttpConnection::flush()!
2007-01-21 15:07:35.077 [DEBUG] [67.188.175.53:56390-0#notarydepot] HttpIOLink::flushSSL()...
2007-01-21 15:07:35.077 [DEBUG] [67.188.175.53:56390-0#notarydepot] HttpConnection::nextRequest()!
2007-01-21 15:07:35.077 [DEBUG] [67.188.175.53:56390-1] processNewReq() return 0. 
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1] HttpIOLink::handleEvents() events=1!
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1] HttpConnection::onReadEx(), state: 0!
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1] readToHeaderBuf(). 
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1] read 349 bytes to header buffer
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1] processHeader() return 0, header state: 3. 
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1] readToHeaderBuf() return 0. 
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1#notarydepot] New request: 
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1#notarydepot] Find context with URI: [/], location: [/sites/notarydepot/releases/20070120201933/public/]
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1#notarydepot] processContextPath() return 0
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1#notarydepot] readyCacheData() return 0
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1#notarydepot] m_pHandler->onWrite() return 0
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1#notarydepot] HttpConnection::flush()!
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1#notarydepot] HttpIOLink::flushSSL()...
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-1#notarydepot] HttpConnection::nextRequest()!
2007-01-21 15:07:35.343 [DEBUG] [67.188.175.53:56390-2] processNewReq() return 0. 
2007-01-21 15:07:40.877 [DEBUG] [67.188.175.53:56390-2] Keep-alive timeout, close!
2007-01-21 15:07:40.877 [DEBUG] [67.188.175.53:56390-2] Shutting down SSL ...
2007-01-21 15:07:40.877 [DEBUG] [67.188.175.53:56390-2] Close socket ...
 

inspirix

Active Member
#2
As a followup, I seem to have fixed it, but not in a way that I know what happened in the first place to cause it.

I backed up my virtual host's xml file. I then delete the virtual host from the admin interface. I re-created the virtual host from the admin interface, and then restarted the webserver. Here is a diff of the virtual host's xml file:

Code:
[root@web sites]# diff -u notarydepot.xml nd.old.xml 
--- notarydepot.xml     2007-01-21 15:52:34.000000000 -0500
+++ nd.old.xml  2007-01-21 15:50:54.000000000 -0500
@@ -69,8 +69,11 @@
     </context>
   </contextList>
   <rewrite>
-    <enable>0</enable>
+    <enable>1</enable>
     <logLevel>0</logLevel>
+    <rules>RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
+RewriteCond %{SCRIPT_FILENAME} !maintenance.html
+RewriteRule ^.*$ /system/maintenance.html [L]</rules>
   </rewrite>
   <frontPage>
     <enable>0</enable>
I dont see how its possible the rewrite could have started interfering, but Im going to leave it out for a while until I need it again.

It would still be nice to get some feedback (even pure speculation) as to what could have happened.
 
Top