timeout problems with file_column and rails?

J

John Thompson

I'm using file_column with ruby on rails and I'm having a problem with
uploads timing out if they are larger than 50k or so. After about a
minute, webrick gives me these errors:

#<WEBrick::HTTPStatus::RequestTimeout:
WEBrick::HTTPStatus::RequestTimeout>
["/usr/lib/ruby/1.8/webrick/httprequest.rb:335:in `_read_data'",
"/usr/lib/ruby/1.8/webrick/httprequest.rb:344:i n `read_data'",
"/usr/lib/ruby/1.8/webrick/httprequest.rb:282:in `read_body'",
"/usr/lib/ruby/1.8/webrick/httpre quest.rb:126:in `body'",
"/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:116:in
`handle_dispatch' ",
"/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in
`service'", "/usr/lib/ruby/1.8/webrick/h ttpserver.rb:104:in
`service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'",
"/usr/lib/ruby/1.8/webric k/server.rb:173:in `start_thread'",
"/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'",
"/usr/lib/ruby/ 1.8/webrick/server.rb:95:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'",
"/usr/lib/ruby/1.8/we brick/server.rb:23:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'",
"/usr/lib/ruby/gems/1.8/gem
s/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'",
"/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/ser
vers/webrick.rb:59",
"/usr/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'",
"/usr/lib/ruby/gems/1.
8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'", "/usr/lib/ruby/gems/1.8/gems/ra
ils-1.1.2/lib/commands/server.rb:30",
"/usr/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'",
"/usr
/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'", "script/server :3"]
[2006-06-15 10:16:08] ERROR `/songs/create' not found.
[2006-06-15 10:16:38] ERROR HTTPRequest#fixup:
WEBrick::HTTPStatus::RequestTimeout occured.
ip addr - - [15/Jun/2006:10:15:35 EDT] "POST /songs/create HTTP/1.1"
404 287
http://HOSTNAME:3000/songs/new -> /songs/create
#<WEBrick::HTTPStatus::RequestTimeout:
WEBrick::HTTPStatus::RequestTimeout>
["/usr/lib/ruby/1.8/webrick/httprequest.rb:335:in
`_read_data'",[2006-06-15 10:16:08] ERROR `/songs/create' not
found.
[2006-06-15 10:16:38] ERROR HTTPRequest#fixup:
WEBrick::HTTPStatus::RequestTimeout occured.
ip addr- - [15/Jun/2006:10:15:35 EDT] "POST /songs/create HTTP/1.1" 404
287

---

I don't believe it's a problem with my code because if it's a small
file, I don't have any problem at all. If I watch the packets going
out on the client pc, they go out very intermittently, and the 54k file
I uploaded took 6 seconds. I'm on a t1 connection and the ping I have
to the server is about 30ms.

Also, this worked perfectly fine yesterday, and I'm fairly sure I
haven't changed anything. It's a very short, simple script.

Does anyone have any idea how troubleshoot this?
 
H

Henrik Sachse

Hi,
ip addr- - [15/Jun/2006:10:15:35 EDT] "POST /songs/create HTTP/1.1" 404
does the file exist?

//Henrik


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEkZW2QEfIen8ZSb4RAj6VAKCMgMMzEU0tjP/XLC5wPXdKRvW2wgCdGnE8
Ab/lgN9tlVDjmwCSa74zm18=
=Ea6J
-----END PGP SIGNATURE-----
 
J

John Thompson

songs/create does, yes.. it's an action in the songs controller. It
works if the file uploads successfully. At this point, I believe this
is probably a network problem becuase I can't ftp large files to the
server, either, I've just discovered.

Henrik said:
Hi,
ip addr- - [15/Jun/2006:10:15:35 EDT] "POST /songs/create HTTP/1.1" 404
does the file exist?

//Henrik


--------------enig684734A31D70DB7B20496B66
Content-Type: application/pgp-signature
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="signature.asc"
Content-Description: OpenPGP digital signature
X-Google-AttachSize: 255
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top