timeout problems with file_column and rails?

Discussion in 'Ruby' started by John Thompson, Jun 15, 2006.

  1. 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?
    John Thompson, Jun 15, 2006
    #1
    1. Advertising

  2. 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-----
    Henrik Sachse, Jun 15, 2006
    #2
    1. Advertising

  3. 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
    John Thompson, Jun 15, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Do
    Replies:
    2
    Views:
    6,362
  2. Sosh
    Replies:
    1
    Views:
    1,864
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Dec 31, 2005
  3. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,279
    Brian Candler
    Oct 6, 2004
  4. basi
    Replies:
    4
    Views:
    103
  5. rordirectory

    WaterMark with file_column

    rordirectory, Oct 20, 2006, in forum: Ruby
    Replies:
    1
    Views:
    78
    Austin Ziegler
    Oct 24, 2006
Loading...

Share This Page