"Could not create paste: server error or not responding" Error when Attaching Files #1588
-
Describe the problem/questionI’m running PrivateBin Version: v1.7.8 installed in a Proxmox LXC using a Proxmox Helper Script. I can successfully upload pdf files to a paste if the size of the pdf is less than ~500KiB, but if I try with a 900Kib+ pdf it fails with the following message: I can successfully create pastes without any file uploads and for pastes with smaller file uploads. I've tried editing the config file (/opt/privatebin/cfg/conf.php) to increase the sizelimit to 1GiB. The only two changes I have made to the config file are:
Also, if i run I'm not sure what web server is running, so I tried finding the PHP error logs using:
But neither of these files contain any error messages during the failure. It looks like a timeout or a size limit issue, but I'm out of ideas. Any thoughts? Did you use the FAQ section?
What you did?In the Web GUI:
What happensThe error messge is displayed: What should happenGreen box with a Copy Link button. Additional informationNo response Server addressself hosted Server OSDebian 12 WebserverNo response PrivateBin versionv1.7.8 Browser and versionFirefox, Brave, LibreWolf Local operating system and versionPop!_OS 22.04 LTS Issue reproducibilityYes, reproducible on https://privatebin.net. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
See the diagram in https://github.com/PrivateBin/PrivateBin/wiki/Configuration#sizelimit - its not just PHP and it's POST and memory limits at play, but also the webserver settings for the maximum POST sizes, etc. This script, which is not maintained by us, seems to use nginx. In nginx you need to change the client_max_body_size setting, it's default is only 1 MiB, which matches the issue you encounter. Raising it to 1 GiB is definitely a bad idea, since your instance, according to the script, is limited to 1 GiB of RAM and in PHP on the server side the paste will get loaded into memory at least twice, once to parse and validate the JSON and to check if the payload is valid base64 and doesn't compress (which indicates it contains encrypted data). So to upload a single paste of 1 GiB at a time the PHP memory limit needs to be 2-3 GiB per request. And if you run multiple php-fpm processes you'd need to multiply that by the number of workers. |
Beta Was this translation helpful? Give feedback.
See the diagram in https://github.com/PrivateBin/PrivateBin/wiki/Configuration#sizelimit - its not just PHP and it's POST and memory limits at play, but also the webserver settings for the maximum POST sizes, etc.
This script, which is not maintained by us, seems to use nginx. In nginx you need to change the client_max_body_size setting, it's default is only 1 MiB, which matches the issue you encounter.
Raising it to 1 GiB is definitely a bad idea, since your instance, according to the script, is limited to 1 GiB of RAM and in PHP on the server side the paste will get loaded into memory at least twice, once to parse and validate the JSON and to check if the payload is valid base64 and doe…