XF 1.5 Error Attaching Images

Wesker

Well-known member
This is an ongoing issue for which our host can not resolve. Since we migrated to our new servers, we have had a number of issues uploading files. We can temporarily fix the issue but then it comes back later.

THE FOLLOWING ERROR OCCURRED

The uploaded file is too large for the server to process. (We changed the phrase)

Updated the PHP file to this

We have set the below mentioned values for the respective directives.

========================
memory_limit = 1024M
upload_max_filesize = 1024M
post_max_size = 1024M
======================

admin.php?options/list/attachments
Maximum Attachment File Size (KB) set to 1024
Set to ImageMagick PECL Extension
This is checked Use Flash Uploader

Need assistance as we can't seem to fix the issue.
 
yes, the client_max_body_size has to be changed frequently. It should be in your nginx configuration file - or possibly in an include file that the nginx config calls.
 
We can temporarily fix the issue but then it comes back later.
There is nothing in XF which would cause this so it can only be a server related issue.

This would tie in with the fact that it only started since you switched servers,.

Your sysadmin or host will have to investigate and resolve it.
 
There is nothing in XF which would cause this so it can only be a server related issue.

This would tie in with the fact that it only started since you switched servers,.

Your sysadmin or host will have to investigate and resolve it.

They said they have reviewed everything and believe we should ask the xF team for help.
 
There is nothing in XF which would cause this so it can only be a server related issue.

This would tie in with the fact that it only started since you switched servers,.

Your sysadmin or host will have to investigate and resolve it.

Went back to them again and they said

The only option to resolve the reported problem which you are facing is to contact the Xenforo support and ask them if there is any specific setting required to modify on server. As we did not find any error logs which shows there is problem with server configuration. You can ask the Xenforo support to take help of there developer and get back to us if any changes are to made on server.
 
You would have to ask your host what they are doing to 'temporarily fix the issue'.

There is nothing in XF which can stop attachments/uploads working after a period of time.
 
You would have to ask your host what they are doing to 'temporarily fix the issue'.

Host

Please update the Xenforo support team that we have set below mentioned values for the respective directives by which the image get uploaded successfully.

========================
memory_limit = 1024M
upload_max_filesize = 1024M
post_max_size = 1024M
======================

Please ask the Xenforo support to take help of there web developer team and get back to us if any changes are to made on server.
 
But have they modified the nginx config file with the values appropriate. Those you are relaying pertain to PHP. Nothing about nginx client_max_body_size. And then of course php and nginx needs to be restarted to take effect.
Add to that, are you using anything like CloudFlare or any other proxy/CDN?
 
But have they modified the nginx config file with the values appropriate. Those you are relaying pertain to PHP. Nothing about nginx client_max_body_size. And then of course php and nginx needs to be restarted to take effect.
Add to that, are you using anything like CloudFlare or any other proxy/CDN?

Yes we are using Cloudflare.
 
Host

Please update the Xenforo support team that we have set below mentioned values for the respective directives by which the image get uploaded successfully.

========================
memory_limit = 1024M
upload_max_filesize = 1024M
post_max_size = 1024M
======================

Please ask the Xenforo support to take help of there web developer team and get back to us if any changes are to made on server.
If making these changes fixes the issue, it wouldn't be a temporary fix; it should be a permanent fix. If it comes back later, then something else in the environment must be causing the issue. It could be that you changing these values is restarting the service and thus masking the issue.

The other thing to check is where PHP is writing its temporarily uploaded files. If that can't be written to or fills up, this sort of issue could occur.

A simple test would be to upload the attached script somewhere and upload files through it. If you see an error value (> 0) in the result, then it's something more low level than XF.
 

Attachments

Just for reference:

We have already configured the PHP and nginx upload limits setting on the server.

As per the cloudflare support they provide 100MB upload limit at Free.

The PHP is writing file to /tmp and /tmp have correct permission.
 
What size are the files.. you have your PHP and nginx set to a tad over 1GB. But if the file sizes are in excess of 100MB, then it will most likely be CloudFlare. You haven't said what size files you are having uploaded when that occurs.
There is not any real need to have your php and nginx limits set that high since you are limited by CloudFlare, so I'd drop them down to around 300MB or so.
You also have your maximum upload size in the ACP (according to your info) set at 1 Megabyte (roughly).

Also, are you running any add-ons that deal with uploads/images on the site?
 
Last edited:
What size are the files.. you have your PHP and nginx set to a tad over 1GB. But if the file sizes are in excess of 100MB, then it will most likely be CloudFlare. You haven't said what size files you are having uploaded when that occurs.
There is not any real need to have your php and nginx limits set that high since you are limited by CloudFlare, so I'd drop them down to around 300MB or so.
You also have your maximum upload size in the ACP (according to your info) set at 1 Megabyte (roughly).

Also, are you running any add-ons that deal with uploads/images on the site?

Nginx was also set as well. PHP settings were changed. It doesn't matter the size of the file, 50 kb, 1MB, 100 MB none of them upload. Despite our adjustments to PHP and Nginx the problem only is temporarily fixed and then uploading attachments breaks again and won't allow any size to be uploaded.

For add ons I have checked and none of them apply to attachments. I was thinking about adding some but can't until this is resolved.

Stuck on what this issue could be. The host has made the changes recommended which fixes the issue temporarily but then 1-2 days later I am unable to attach even 50 kb files again.
 
Have you checked what happens with the test script I provided when it stops working? Does it report an error code for the same files?
 
Top Bottom