1 follower Follow

"Unexpected response from server" error with file upload

I currently running Rstudio server v0.98.490 on Ubuntu server 13.10 and a having difficulty uploading files larger than 1mb through the browser interface. These are my steps leading to the error:

  1. Click the "Upload" button in the file manager pane.
  2. Choose File
  3. Click okay

If the file is bigger than about 1mb, I immediate receive an "Unexpected response" pop-up. If it is smaller than 1mb, the upload goes through just fine.

This occurs under default server settings where there is no rsession.conf or rserver.conf files, so there should be no upload limit. I also created a rsession.conf file with the "limit-file-upload-size-mb" option, and restarted the server and rsession. The same error occurs.

Kind of stumped... Any guidance would be greatly appreciated.

  • David
David Huh

1 comment


I figured out what was going on! As suggested, I setup Nginx as a proxy server. However, by default Nginx limits client to server uploads to something impractically small (i.e., ~1mb). So I added the following line to the http {} section of the nginx.conf file, which allows for uploads up to 1gb:

client_max_body_size 1000M;

...and it works fine now.

David Huh 1 vote
Comment actions Permalink