Fixing “To many server errors” Sync Issue

During the initial sync to Infinite Uploads cloud, you may see this message: Too many server errors. Please try again. This happens when the sync process encounters repeated failures while uploading files from your server to the cloud.

The error itself is not a problem with the Infinite Uploads service. It’s almost always caused by your hosting server running into resource limits, timeouts, or rate restrictions during the upload process. Think of it like trying to carry too many boxes out of your office at once. Your server can handle the load, it just needs some adjustments to the pace.

What Causes This Error

The sync process works by making repeated AJAX requests from your browser to your WordPress server, which then uploads batches of files to the cloud. Each batch runs within your server’s PHP execution time limit. If requests fail (due to 504 timeouts, 503 errors, or PHP memory exhaustion), the plugin retries with an exponential backoff, waiting longer between each attempt (up to about 90 seconds). After 6 consecutive failures, it stops the sync and shows the error message.

Common causes:

Low PHP memory limit. If your WordPress memory limit is set to 64 MB or 128 MB (common defaults), the sync may run out of memory when processing larger batches of files.

Short PHP execution time. Many shared hosts set max_execution_time to 30 or 60 seconds. The plugin calculates its internal timeout as roughly 2/3 of your max execution time. If that’s too short to complete a batch, you’ll get timeouts.

Too many concurrent uploads for your server. The plugin uploads up to 15 files in parallel by default. Some servers, especially shared hosting, can’t handle that many simultaneous outbound connections.

Batch size too large. Each sync loop processes up to 12 MB of files at a time by default. On slower servers or connections, this may be more than the server can push to the cloud before the PHP process times out.

Quick Fix: Increase Memory and Execution Time

Start here. Contact your webhost about increasing the PHP memory limit. If you don’t want to, you can do it manually. Add these lines to your wp-config.php file (before the line that says “That’s all, stop editing!”):

define( 'WP_MEMORY_LIMIT', '256M' );
set_time_limit( 300 );

This gives WordPress 256 MB of memory and a 5-minute execution window per request. For most sites, this alone fixes the issue. If your host overrides these values at the server level, you may need to contact them to increase the limits in your hosting control panel or PHP configuration.

After making changes, go back to the Infinite Uploads plugin page and click Sync Now. The sync picks up where it left off. It won’t start over.

Advanced: Reduce Sync Speed with wp-config.php Constants

If increasing memory and execution time doesn’t resolve it, you can slow down the sync to reduce the load on your server. These constants go in your wp-config.php file.

For “Too many open files” errors

If your PHP error log shows “Too many open files,” your server is hitting its file descriptor limit from too many simultaneous upload connections. Lower the concurrency:

define( 'INFINITE_UPLOADS_SYNC_CONCURRENCY', 5 );
define( 'INFINITE_UPLOADS_SYNC_MULTIPART_CONCURRENCY', 2 );
ConstantDefaultWhat It Controls
INFINITE_UPLOADS_SYNC_CONCURRENCY15How many files upload simultaneously in each batch
INFINITE_UPLOADS_SYNC_MULTIPART_CONCURRENCY5Parallel parts when uploading a single large file

Lowering concurrency from 15 to 5 means fewer simultaneous connections, which gives your server more room to breathe. The sync will take longer, but it’s less likely to hit resource limits.

For 504/503 timeout errors

If your server is timing out before completing a batch, reduce how much the plugin tries to upload per loop:

define( 'INFINITE_UPLOADS_SYNC_PER_LOOP', 500 );
define( 'INFINITE_UPLOADS_SYNC_MAX_BYTES', 2097152 );
ConstantDefaultWhat It Controls
INFINITE_UPLOADS_SYNC_PER_LOOP1000Max number of files queued per sync loop
INFINITE_UPLOADS_SYNC_MAX_BYTES12 MBMax total bytes per batch (the plugin will always upload at least one file, even if it exceeds this limit)

Setting SYNC_MAX_BYTES to 2097152 (2 MB) means each batch pushes less data before returning control to the browser. Combined with a lower SYNC_PER_LOOP, this keeps each request small enough to finish within your server’s timeout window.

You may need to experiment with these values. If 500/2 MB still times out, try 250 and 1048576 (1 MB). The sync will be slower, but it’ll finish.

Best Option: Use WP-CLI Instead

If your host provides WP-CLI access, this bypasses the browser-based sync entirely. WP-CLI runs server-side with no AJAX timeouts, no browser dependency, and a default concurrency of 20. It’s the fastest and most reliable way to get your files to the cloud.

SSH into your server and run:

wp infinite-uploads sync

WP-CLI doesn’t share the same concurrency constants as the browser sync. It uses its own –concurrency flag (default 20), which you can adjust:

wp infinite-uploads sync --concurrency=10

For the full command reference, see the WP-CLI Commands and Usage Docs.

How the Retry System Works

The plugin has built-in retry logic on two levels:

Per-file retries. Each file gets up to 3 upload attempts. If a file fails 3 times, it’s skipped and logged in the error display within the sync modal. The rest of the library continues syncing. You can see which files failed and address them individually.

Per-request retries. If the entire AJAX request fails (like a 504 from your server), the browser-side JavaScript retries up to 6 times with exponential backoff. The wait time between retries increases with each failure, up to about 90 seconds. After 6 consecutive request failures, the sync stops and shows the “Too many server errors” message.

When you restart the sync after this error, it picks up where it left off. Files that were already successfully uploaded stay uploaded. No progress is lost.

If the Error Keeps Coming Back

If you’ve tried the wp-config.php adjustments and the sync still fails repeatedly, check these:

Check your PHP error log. Look for specific errors like “Allowed memory size exhausted,” “Maximum execution time exceeded,” or “Too many open files.” Each one points to a different constant to adjust.

Check for a web application firewall (WAF). Some hosts and security plugins (Wordfence, Sucuri, Cloudflare) may rate-limit or block the repeated AJAX requests that the sync generates. Temporarily disabling the WAF or allowlisting the sync endpoint can help.

Check for server-level limits. Some hosts impose limits that can’t be changed via wp-config.php. If your host locks down max_execution_time or memory at the server level, you’ll need to contact them or switch to WP-CLI.

If none of this resolves it, open a support ticket. Include your PHP error log and the wp-config.php constants you’ve tried. We’ll get it sorted.