Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: pintosal on October 20, 2015, 07:15:58 AM

Title: Upload Folder Full
Post by: pintosal on October 20, 2015, 07:15:58 AM
If I create a document with a 10Mb attachment, it appears to upload but then gives the error "Upload folder full"

On the Admin > Attachment Settings the settings Max attachment folder space, Max attachment size per post, Max size per attachment, and Max number of attachments per post are all set to 0 (no limit)

My server disk space usage is nowhere near full (390Mb/6Gb)

Help would be appreciated.
Title: Re: Upload Folder Full
Post by: Illori on October 20, 2015, 07:30:38 AM
what is the value of Max attachment directory space ? i bet if you increase that number it will solve your issue.
Title: Re: Upload Folder Full
Post by: pintosal on October 20, 2015, 08:04:38 AM
Quote from: Illori on October 20, 2015, 07:30:38 AM
what is the value of Max attachment directory space ? i bet if you increase that number it will solve your issue.
There is no setting Max attachment directory space. There is a Max attachment folder space which is set to 0, which implies no limit.

Are you suggesting actually setting a value? If so, what value would you suggest?
Title: Re: Upload Folder Full
Post by: Illori on October 20, 2015, 08:11:51 AM
yes, you need a value set there. you need to check the size of the folder on your server to start and go from there.
Title: Re: Upload Folder Full
Post by: pintosal on October 20, 2015, 10:06:04 AM
Unfortunately, this does not solve the problem.

I am trying to upload a single 8Mb zip file.

On the document creation page, near the bottom, it shows:
Restrictions: 500 per post, maximum total size 500000KB, maximum individual size 500000KB

Clearly, it is nowhere near these limits, but it is failing to save the document, and the attachment is not on the server attachment folder.

For info, the current attachment folder size on the server is 140Mb, and I have lots of spare space

Title: Re: Upload Folder Full
Post by: Kindred on October 20, 2015, 11:29:27 AM
how many FILES are in the current upload folder?   your **SERVER** (outside of SMF) might have a limit
Title: Re: Upload Folder Full
Post by: a10 on October 20, 2015, 11:35:25 AM
QuoteThere is a Max attachment folder space which is set to 0, which implies no limit.
That's the setting on my forum, space limit then being available server space.
In my case, host got no max nr of files (only restriction is max 9999 wil be viewable in ftp).
Title: Re: Upload Folder Full
Post by: pintosal on October 20, 2015, 12:37:23 PM
Quote from: Kindred on October 20, 2015, 11:29:27 AM
how many FILES are in the current upload folder?   your **SERVER** (outside of SMF) might have a limit
Currently about 150 files. So I very much doubt that's a limiting factor.
Title: Re: Upload Folder Full
Post by: margarett on October 20, 2015, 07:15:23 PM
There is no "Upload folder full" error message in SMF, or at least I don't find it in the code. Can you printscreen the *exact* error message?
Quote from: pintosal on October 20, 2015, 10:06:04 AM
On the document creation page, near the bottom, it shows:
Restrictions: 500 per post, maximum total size 500000KB, maximum individual size 500000KB
Please use plausible limits... Do you really want to allow 500 files, over a maximum or individual size of 500Mb? Set the limits to (eg) 10 files, 10 or 20Mb each, max 40Mb or so. It makes no sense to use such huge values...
Title: Re: Upload Folder Full
Post by: pintosal on October 21, 2015, 04:39:00 AM
Quote from: margarett on October 20, 2015, 07:15:23 PM
There is no "Upload folder full" error message in SMF, or at least I don't find it in the code. Can you printscreen the *exact* error message?
Quote from: pintosal on October 20, 2015, 10:06:04 AM
On the document creation page, near the bottom, it shows:
Restrictions: 500 per post, maximum total size 500000KB, maximum individual size 500000KB
Please use plausible limits... Do you really want to allow 500 files, over a maximum or individual size of 500Mb? Set the limits to (eg) 10 files, 10 or 20Mb each, max 40Mb or so. It makes no sense to use such huge values...
I did receive the Upload Folder Full message, which now no longer appears.

1 was trying to set limits that would not be exceeded.

Clearly setting 0 (no limit) or smaller limits failed to cure the problem.

Any other suggestions?
Title: Re: Upload Folder Full
Post by: a10 on October 21, 2015, 06:59:15 AM
QuoteAny other suggestions?
As an experiment\test, create a 2nd upload folder and set it as active, and see what happens.
Title: Re: Upload Folder Full
Post by: margarett on October 21, 2015, 09:22:59 AM
Was this what you got?
QuoteThe upload folder is full. Please try a smaller file and/or contact an administrator.
Title: Re: Upload Folder Full
Post by: pintosal on October 21, 2015, 12:59:48 PM
Yes, that's what I got
Title: Re: Upload Folder Full
Post by: margarett on October 21, 2015, 01:24:31 PM
This is how the error is generated:
// Too big!  Maybe you could zip it or something...
if ($_FILES['attachment']['size'][$n] + $dirSize > $modSettings['attachmentDirSizeLimit'] * 1024)
fatal_lang_error('ran_out_of_space');


So, if the attachment(s) you're loading, added to the already determined attachments directory size, are bigger than the size limit for the attachments folder, you get that error.

If you disable "Max attachment folder space" in attachment settings, you can't get that error anymore. You said you set it to 0, so it should not happen. Check your smf_settings table, row "attachmentDirSizeLimit", what value is present.
Title: Re: Upload Folder Full
Post by: pintosal on October 22, 2015, 02:15:08 PM
There is no row called attachmentDirSizeLimit in my table.

See attachment
Title: Re: Upload Folder Full
Post by: Illori on October 22, 2015, 02:17:52 PM
you need to check your smf_settings table for that row, not your attachments table.
Title: Re: Upload Folder Full
Post by: pintosal on October 22, 2015, 02:24:45 PM
Oooops!

attachmentDirSizeLimit =   1500000
Title: Re: Upload Folder Full
Post by: margarett on October 22, 2015, 06:01:30 PM
Set it to 0
Title: Re: Upload Folder Full
Post by: pintosal on October 23, 2015, 11:35:15 AM
Quote from: margarett on October 22, 2015, 06:01:30 PM
Set it to 0
OK, so I reset all settings to 0 (as in my first post).

Then I tried the following:
1. Attached a 6Mb zip file to a new document => success
2. Attached an 8Mb zip file to a new document => fail
3. Attached a 6Mb file to a new document, which was successful. Then I clicked Modify and attached a second 6Mb file => success
4. Attached a 6Mb file to a new document, which was successful. Then I clicked Modify and attached a second 8Mb file => fail

There seems to be a limitation on the individual attachment size of approximately 8Mb.

What is causing this?
Title: Re: Upload Folder Full
Post by: margarett on October 23, 2015, 11:43:06 AM
What do you get as an error?
Title: Re: Upload Folder Full
Post by: Kindred on October 23, 2015, 12:37:37 PM
I am betting there is a HOST-SIDE setting regarding the max upload size...
Title: Re: Upload Folder Full
Post by: pintosal on October 23, 2015, 02:27:38 PM
Mostly no error messages.

It returns a blank New Topic document, and there is no new document on the list of documents.
Title: Re: Upload Folder Full
Post by: margarett on October 23, 2015, 06:55:54 PM
Yeah, that's most likely a PHP error caused by a PHP limit. Check your PHP server logs, it should confirm that...
Title: Re: Upload Folder Full
Post by: pintosal on October 24, 2015, 01:40:38 PM
I could not find anything in the logs, so I contacted the hosting service provider. It seems they have some server limits in place (post max size and Upload size) which I hit.

The limits were removed and now all is OK.

Thanks for the assistance.