• Resolved rickcode

    (@rickcode)


    Background
    Whenever a user submits a listing on our site, it takes really long for the images to be uploaded. To illustrate, without images a listing submits in <2 seconds, but when images are added, for example with a total ~10MB, it takes 90 seconds (1.5 minutes). This is obviously way to long and users will leave the website before the upload finishes.

    What we in contact with the theme (listify) developers and server maintainers have tried:

    • add_filter( ‘big_image_size_threshold’, ‘__return_false’ );
    • Listing submit with the Twenty Nineteen theme instead of listify – upload time is even higher according to listify developer
    • Tried older version of WP job manager (1.32.3)
    • Moved to a different webhost (the current one), that is specific for wordpress sites and focusses on speed (https://getflywheel.com/why-flywheel/site-speed/)
    • Increasing the WP_MEMORY_LIMIT to 256M
    • Increase resources for PHP processes (this went via the server so not entirely sure what the exact settings were)
    • Tried different geographical locations

    The webhost noticed PhP processes that took “long” (>5 seconds to log) when submitting a listing:

    [0x00007fa84fa1f0f0] unsharpmaskimage() /wordpress/wp-includes/class-wp-image-editor-imagick.php:363
    [0x00007fa84fa1efe0] thumbnail_image() /wordpress/wp-includes/class-wp-image-editor-imagick.php:535
    [0x00007fa84fa1eee0] crop() /wordpress/wp-includes/class-wp-image-editor-imagick.php:263
    [0x00007fa84fa1ed90] resize() /wordpress/wp-includes/class-wp-image-editor-imagick.php:479
    [0x00007fa84fa1ecd0] make_subsize() /wordpress/wp-admin/includes/image.php:435
    [0x00007fa84fa1eba0] _wp_make_subsizes() /wordpress/wp-admin/includes/image.php:362
    [0x00007fa84fa1ea80] wp_create_image_subsizes() /wordpress/wp-admin/includes/image.php:476
    [0x00007fa84fa1e8a0] wp_generate_attachment_metadata() /www/wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php:745
    [0x00007fa84fa1e740] create_attachment() /www/wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php:818
    [0x00007fa84fa1e5f0] update_job_data() /www/wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php:614
    [0x00007fa84fa1e500] submit_handler() /www/wp-content/plugins/wp-job-manager/includes/abstracts/abstract-wp-job-manager-form.php:95
    [0x00007fa84fa1e440] process() /wordpress/wp-includes/class-wp-hook.php:288
    [0x00007fa84fa1e360] apply_filters() /wordpress/wp-includes/class-wp-hook.php:312
    [0x00007fa84fa1e2f0] do_action() /wordpress/wp-includes/plugin.php:544
    [0x00007fa84fa1e230] do_action_ref_array() /wordpress/wp-includes/class-wp.php:742
    [0x00007fa84fa1e1b0] main() /wordpress/wp-includes/functions.php:1255
    [0x00007fa84fa1e110] wp() /wordpress/wp-blog-header.php:16
    [0x00007fa84fa1e080] INCLUDE_OR_EVAL /www/index.php:17

    Help
    We have been looking for the cause now for more than 2 weeks but can not seem to locate it. The Listify developer thought it was related to the server, and the latest comment of the server maintainers was that it may relate to the implementation of the image upload. Hence I came to this forum in the hope to finally find something that may cause this – if related to WP job manager or not since that also is valuable information.

    Thankyou in advance!
    Rick

    • This topic was modified 4 years, 5 months ago by rickcode.
    • This topic was modified 4 years, 5 months ago by rickcode.
    • This topic was modified 4 years, 5 months ago by rickcode.
    • This topic was modified 4 years, 5 months ago by Yui. Reason: extra link deleted

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi!

    This certainly sounds like a server problem indeed. I’m curious:

    1) What version of PHP is the server using?
    2) Does this happen when you try to create a post or page and add images to it in the back-end?

    Thread Starter rickcode

    (@rickcode)

    Response to your questions
    The response went to my spam folder so did not see it immediately!
    1) The server has PHP version 7.3
    2) Yes the same happens when I edit a listing and here upload gallery images

    Tried different servers so I’m not sure
    Although I indeed thought it may be related to the server I find it weird that when 1) Flywheel used all their capacity on an isolated server a file upload still took long – for the processes mentioned above 2) I did not find increased speed locally, on bluehost VPS, and on the Listify demo page.

    A little test
    When I disable image resizing (via a plugin or skipping the wp_create_image_subsizes() function) uploads happen nearly instantly (<1 sec). I can increase the “submission speed” a little bit by removing unnecessary sizes when a user uploads but still the upload speed is far from ideal. As a quick fix I may now, although not prefered, skip the preview step entirely and resize in a cron-job such that a user does not have to wait for this. Nevertheless, it would be far more ideal to have the preview step, so I still wonder if this really is a server issue (as described above)

    Thread Starter rickcode

    (@rickcode)

    This is the last thing we need to fix before the site can go live so maybe it will help to provide you with the website credentials such that you can take a look at it?

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi!

    You mentioned:

    2) Yes the same happens when I edit a listing and here upload gallery images

    But I had specifically asked about posts or pages, not job listings; if it’s happening with posts or pages as well, then we’ll know that the issue is not limited to just WPJM and the job listings, and that it’s something else on the server. So, can you confirm whether or not this happens with posts or pages on the site as well?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Slow image upload for listing submission’ is closed to new replies.