• Resolved atg2020wp

    (@atg2020wp)


    Hi, when we engage “Automatic Image Compression” our upload times of products increase from on average 10 min to 30 min. We upload an average of 100 to 150 products a day, which each have 10 to 15 images associated with them. This delay is causing us lost production time of 3 to 5 hrs. a day. Any idea, why the upload time for something that is supposed to take place after upload increases so significantly? Look forward to your feedback. Thanks, Stephan

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support wpmansour

    (@wpmansour)

    I understand that the increased upload times are causing significant delays in your workflow. Let’s try to pinpoint the issue.

    1. Do you have any other optimization plugins installed? If so, which ones?
    2. What is the average size of the images you are uploading?
    3. Is your server under heavy load or running other intensive tasks while you upload images?
    4. What kind of hosting are you using (shared, VPS, dedicated)?

    These details will help us better understand your setup and provide a more accurate solution.

    Looking forward to your response!

    Thread Starter atg2020wp

    (@atg2020wp)

    Hi,

    1. No other optimization plug-in present.
    2. 400 – 600KB
    3. Not to my knowledge.
    4. A shared business server.

    Best Regards, Stephan

    Plugin Support wpmansour

    (@wpmansour)

    Thank you for your patience. I have tested in various environments, and based on our tests, WP-Optimize typically handles image uploads and compression efficiently. The significant delay you’re experiencing is unusual. This issue is likely connected to your server or firewall settings, which might be delaying the response to bulk upload actions.

    I recommend reaching out to your server support team to investigate this delay. They can check if there are any server-side constraints or firewall rules affecting the upload process. Additionally, verifying if the server is under heavy load during these times or running other intensive tasks might help pinpoint the issue.

    Thread Starter atg2020wp

    (@atg2020wp)

    Thanks for your reply.

    Ok, so let me get this straight. When I do not have automatic image compression turned on, no constraints are put on my uploads by the server or firewall settings, but when I turn on automatic image compression the constraints are suddenly there, and you are telling me it’s the server/firewall settings causing this?

    This does not make sense. If it works fine before automatic image compression is turned on, and not afterwards, the constraint causing the delay in upload times must be something related to engaging automatic image compression in WP Optimize. Is there some type of connection with the media library, between WP Optimize and the upload folder, that might be affected?

    Thanks

    Plugin Support vupdraft

    (@vupdraft)

    Hi,

    I believe there is an intentional delay for the image compression to avoid overloading servers.

    I am just seeing if I can find a filter that might help you.

    Plugin Support vupdraft

    (@vupdraft)

    Here is a quick explanation of what happens when you upload the issue

    1. When a user uploads an image at 10:00, WPO stores the image ID in the database and schedules a cron job,?process_smush_tasks, to run at 10:05 (after 5 mins).
    2. If more images are added within that 5-minute window, their IDs are also stored in the database. Then it checks if the cron job?process_smush_tasks?already exists; if it does, no action is taken, but if not, the cron job is added.
    3. At 10:05, the?process_smush_tasks?cron job runs, processing all stored image IDs at once. It then reschedules itself to run again at 10:15. This ensures all images are processed; if not, the next run will handle any missed tasks.
    4. Any new images added between 10:05 and 10:15 will be processed at 10:15 per step 3, with the cron job scheduling itself again after 10 minutes. If no new images are added, no further cron jobs are scheduled as all tasks are complete.

    Image compression is resource intensive so please make sure your server can handle it. Here is a filter that you can use

    add_filter(‘schedule_event’, function($event){ if($event->hook === ‘process_smush_tasks’){ $event->timestamp = time(); } return $event; });

    add_filter(‘schedule_event’, function($event){

    if($event->hook === ‘process_smush_tasks’){

    $event->timestamp = time();

    }

    return $event;

    });

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.