SynBioHub / synbiohub

Web application enabling users and software to browse, upload, and share synthetic biology designs
https://wiki.synbiohub.org
BSD 2-Clause "Simplified" License
73 stars 23 forks source link

http:413 payload error #613

Closed tramyn closed 5 years ago

tramyn commented 6 years ago

I am trying to push an SBOL file with 30,000 triples but got this error:

{"status":413,"statusCode":413}

Here is the file that I am trying to push to a new SynBioHub collection. c_trips30000.zip

cjmyers commented 6 years ago

This is a problem with your nginx setup. See this article for more information:

https://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/ https://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/

Basically, you need to look for this variable in nginx.conf:

client_max_body_size 2M;

You will need to increase this to allow a larger file to be uploaded.

On Apr 10, 2018, at 9:24 AM, Tramy Nguyen notifications@github.com wrote:

I am trying to push an SBOL file with 30,000 triples but got this error:

{"status":413,"statusCode":413}

Here is the file that I am trying to push to a new SynBioHub collection. c_trips30000.zip https://github.com/SynBioHub/synbiohub/files/1895212/c_trips30000.zip — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SynBioHub/synbiohub/issues/613, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD98u6kw0nEbxN5Vqa-QGEcqkG4_HDks5tnM6tgaJpZM4TOe6J.

3ach commented 6 years ago

The nginx setup is part of the docker image. I am assigning myself and I will release a new Docker image. @tramyn I will also include a cron cleanup in that image so you can avoid the overfilling issue we've discussed elsewhere.

tramyn commented 6 years ago

@zachzundel @cjmyers: I have a concern that I would like to address for this fix. We are using Apache to host our server not nginx so I'm not sure if adding a fix to nginx will solve our file limitation.

cjmyers commented 6 years ago

Good question. Zach indicated to me that the nginx server is running inside docker, so that is why the docker image needs updating. However, if you are also using apache outside, then there might be a file limit through that. I’m unsure how these connect, so it is likely best to connect with Zach to see about the best way to sort this issue.

On Apr 11, 2018, at 7:50 AM, Tramy Nguyen notifications@github.com wrote:

@zachzundel https://github.com/zachzundel @cjmyers https://github.com/cjmyers: I have a concern that I would like to address for this fix. We are using Apache to host our server not nginx so I'm not sure if adding a fix to nginx will solve our file limitation.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SynBioHub/synbiohub/issues/613#issuecomment-380458924, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD96uys68KJE2r3JNaMpgpxCvCzHV2ks5tngoqgaJpZM4TOe6J.

3ach commented 6 years ago

Hm, I think I was wrong earlier when I said nginx was in the Docker. Tramy -- if you are using Apache, then there is a parameter that controls the maximum size of a POST request. The request is getting rejected by Apache before it ever reaches SynBiuHub. I don't really know Apache, so I don't know what it is for sure.

tramyn commented 6 years ago

@zachzundel Yes, we have tried modifying Apache php.ini file by changing the size from post_max_size = 8M -> 100M upload_max_filesize = 2M -> 100M

We then attempted to restart SynBioHub after making this change and we are still getting the same error.

cjmyers commented 6 years ago

Did you restart Apache?

Could nginx also be running in docker and blocking things?

On Apr 11, 2018, at 8:13 AM, Tramy Nguyen notifications@github.com wrote:

@zachzundel https://github.com/zachzundel Yes, we have tried modifying Apache php.ini file and modified the size from post_max_size = 8M -> 100M upload_max_filesize = 2M -> 100M

We then attempted to restart SynBioHub after making this change and we are still getting the same error.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SynBioHub/synbiohub/issues/613#issuecomment-380466867, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWD97nx4O-SbAS51a1u1LGOncLga6lhks5tng9sgaJpZM4TOe6J.

tramyn commented 6 years ago

@cjmyers yes we have restarted apache before restarting SynBioHub.

cjmyers commented 6 years ago

See this post: https://stackoverflow.com/questions/3718571/request-entity-too-large-php/3719358#3719358

Says it can also be your RequestBodyLength setting.

tramyn commented 6 years ago

Modifying the upload file size on the web server (nginx and apache) did not resolve the fix to allow a user from uploading large SBOL files to SynBioHub (~2MB). It is also important to note that I have installed SynBioHub using the Docker option and not the source option. The two instances that I have found to support large upload file size ranging from 2 MB - 4MB are https://synbiohub.org and https://synbiohub.utah.edu . These two instances are installed from source and not from a Docker image. I've talked to @cjmyers about this issue and we will need to perform further testing to verify if what we suspect is a Docker issue that needs to be resolved for large files to be uploaded to SynBioHub.

cjmyers commented 6 years ago

@tramyn can you check with BBN folks to see if this is still an issue?