[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

timeout problems with file_column and rails?

John Thompson

6/15/2006 5:11:00 PM

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?

2 Answers

Henrik Sachse

6/15/2006 5:16:00 PM

0

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

//Henrik

John Thompson

6/15/2006 6:14:00 PM

0

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 Sachse wrote:
> 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