News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

testing attachments - timing upload time

Started by EL34, March 23, 2014, 07:55:43 AM

Previous topic - Next topic

EL34

I am having a problem on my new cloud server with attachments upload times

The same attachment image took 4 seconds on this forum
It took 53 seconds on my forum

My host changed some php settings and changed from fast cg to isapi
This is a window 2008 R2 server
SMF version is 1.1.19

I just moved from a shared server and this was not an issue on that windows server
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.17

Chas Large

Downloaded your attachment and uploaded to my test site, the attachment tool 6.51 seconds from POST click to page full load with thumbnail created.

It could be your site's settings in how the Thumbnail is created that may be slowing things up. Try going to ADMIN > FORUM > ATTACHMENTS AND AVATARS > ATTACHMENTS SETTINGS:

Disable: Re-encode potentially dangerous image attachments

Check and or change the settings for:

Display image attachments as pictures under post
Resize images when showing under posts
Save thumbnails as PNG
Maximum width (in pixels) of thumbnails
Maximum height (in pixels) of thumbnails

Any or all of these can cause some issues.

Do uploading Avatars also take a long time? if so try changing:

If the avatar is too large...

To Let HTML resize it. The other options require scripting and or GD module installation.

Hope this helps.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

EL34

Hi Chas,
And thanks for testing the upload time

I should have mentioned that my forum is SMF 1.1.19
My settings page is different, I don't see all those settings

So my host and I have finished testing the new server using a php program to upload image files
My host tweaked the php.ini and now I can uploaded multiple attachments without SMF timing out.
But, it still takes a very long time to upload the files
As I mentioned in my post above, the same file took 53 seconds on my forum compared to 4 seconds here

Using a test php program, the image files upload very quickly and they also upload very quickly with my FTP program
It's not the server and it's not a PHP issue

So the issue seems to be with SMF on the new cloud server
My old shared windows server uploaded attachments very quickly.

The forum was migrated/copied from the old server to the new server
The configs were changed for the new address and the new mysql database
All that is working fine
The mysql data base is faster than the old server database from my testings
The only issue on the new server that I can find that is that the attachment upload speed is very slow

I do have the Aeva Media mod installed and I am thinking of getting rid of it since not many people use it
other info. Just in case that mod is causing some sort of problem

Old server was php 4.xxx
New server PHP version is 5.2.17
PHP is running ISAPI on windows 2008 R2 server
Plesk control panel

Long winded post I know.
So, now I am asking here if anyone has any ideas why the attachments upload so slowly?
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.17

EL34

Question about attachments

I attached a small .gif file to a test post - this image is 720 x 576 px and 6k in size

SMF 1.1.19 created a thumbnail that is 250 x 200px and 20K in size

It looks as if SMF created a png thumbnail and tripled the bit size?

Just curious why this is?
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.17

EL34

I have some more info on the slow uploading of attachments on my cloud server

It seems that the Uploading (xx%) that shows as the attachment is uploaded goes by very quickly.
So it does seem that the uploading part is fast.

Then after the Uploading (xx%) passes, it says Waiting for myweb.com...
That's the parts that takes a very long time until the attachment shows in the post
It can take up to 1 minute on a 500K image attachment

This was not the case on my old server

I created a test forum by copying my existing forum and created a database copy of the real forum database
But I did not copy over any of the attachment files into the test forum attachment folder
I attached the same .jpg test file that I have been using to a post in the test forum and it uploaded and displayed very fast
But, the .jpg file being uploaded was the only file in the test forum attachment folder

So it seems that there is some sort of house keeping, file counting, procedure that happens after the Uploading (xx%) part happens

It's happens very fast with a clean attachment folder and very slow with the real attachment folder which has +28,000 files in that folder

Anyone have any ideas?
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.17

a10

QuoteIt looks as if SMF created a png thumbnail and tripled the bit size?
For jpg (and lower quality\size) untick "Save thumbnails as PNG" in Attachment settings.
2.0.19, php 7.4.30, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

EL34

As was mentioned above.
This is 1.1.19 and that setting does not exist on my admin page
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.17

Chas Large

Sorry, I should have realised from where this topic is that you're running a 1.1.xx version of SMF. I haven't used that version for years so I can't really advise other than to upgrade to 2.0.xx where you have much better controls etc.

If I had to suggest a "fix", it could be that the old SMF files may not have all been updated to the same level over time and I would backup the database, then remove all mods, wipe the core files and reinstall from a full install and then reinstall the mods. That way you'd effectively have a "new" install with old data. You could also try optimising the tables via MySQL, which can help. Uploading an attachment causes database changes to the message and log tables and if the database is poorly optimised or has too much overhead, it could be this that's causing the delay rather than the "speed" of the upload.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

a10

2.0.19, php 7.4.30, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

EL34

Thanks Chas,
Optimizing could be it but I did that in SMF
I'll go to PHP admin and do it there on all the tables
Checking all files in smf results in all files are up to date

I just updated the test copy SMf forum to SMF 2 and so I may do that to the real forum also

a10, see reply #2 screen shot
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.17

kat


EL34

Hi yes I did after I upgraded to 2.0.7

Creating another attachment folder solved it
That post is here
http://www.simplemachines.org/community/index.php?topic=520948.msg3687952#msg3687952

Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.17

kat

Yay! Thanks for marking it solved, for me. :)

Advertisement: