DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk12 min

How to Fix Slow TTFB for PrestaShop on Nginx

A practical, evidence-based guide to reducing PrestaShop TTFB on Nginx without breaking carts, checkout, accounts, or personalized responses.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Slow first-byte time (TTFB) on a PrestaShop store usually means the request is waiting on PHP-FPM, the database, a module, or an uncached application path before Nginx can send the first byte. Start by measuring representative dynamic URLs, then verify the Nginx-to-PHP-FPM location block, check PHP-FPM worker saturation and its slow log, and investigate database or module delays. Add FastCGI caching only for genuinely public responses; bypass sessions, carts, checkout, accounts, authorization, and any response containing customer state.

What slow TTFB means in a PrestaShop request

TTFB is the elapsed time from the client sending an HTTP request until it receives the first response byte. It is different from total download time: a page can begin responding quickly but take a long time to transfer a large body, or it can have a small body while spending most of its time waiting for PHP and the database.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a dynamic PrestaShop URL, the usual sequence is:

  1. Nginx accepts the connection and selects a location block.
  2. Nginx passes the request to PHP-FPM through a configured socket or upstream.
  3. A PHP-FPM worker loads PrestaShop, runs controller and module code, reads or writes the database, and may call remote services.
  4. PHP sends headers and body data back to Nginx, which returns the first byte and then the rest of the response.

If the delay occurs before PHP-FPM produces output, changing image compression, CSS, or JavaScript will not fix the dynamic TTFB. Those front-end changes can reduce total transfer time after the first byte, but they do not remove a saturated PHP pool or a slow database query.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

There is no authoritative universal “good” PrestaShop TTFB number. Set a target from your own baseline, taking account of the store’s geography, page mix, device population, and whether the request is anonymous or personalized.

Measure the right requests before changing configuration

Separate TTFB from download time

Use a repeatable client or monitoring tool that reports time to first byte separately from total request duration. Test with a warm cache and a cold cache, and record the timestamp, URL, HTTP method, status code, response size, cookies, and whether the request was authenticated. Run enough repetitions to see normal variation rather than relying on one request.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a representative URL set

At minimum, compare an anonymous product page, an anonymous category page, a cart request, a login page, and a checkout request. The first two are possible FastCGI-cache candidates; the latter three normally contain session or customer state and must be treated as dynamic. Include a request from the same region as your customers when geography affects network latency.

Record server-side context

For every test window, capture:

  • TTFB and total download time for each URL class.
  • PHP-FPM active workers, idle workers, queued requests, and the configured worker limit.
  • CPU, memory, and swap use on the web and database hosts.
  • Database response time and slow-query activity.
  • FastCGI cache hit, miss, bypass, and stale status where caching is enabled.
  • Cookies and authorization headers that could make a response private.

Keep a baseline before each change. Re-test the same URLs after one change at a time so an improvement can be attributed and a regression can be rolled back.

Verify the Nginx-to-PHP-FPM path

A location block that routes the wrong script, omits a safety check, or points to an unavailable socket can create errors, retries, or unexpected execution paths. Compare the store’s block with the current PrestaShop Nginx pattern and confirm that it includes the following elements:

  • fastcgi_split_path_info for splitting the script path and path information.
  • try_files $fastcgi_script_name =404 so Nginx will not pass a nonexistent script to PHP-FPM.
  • include fastcgi_params to provide the standard FastCGI parameters.
  • fastcgi_param SCRIPT_FILENAME pointing to the actual document-root path plus the script name.
  • fastcgi_pass set to the PHP-FPM socket or upstream that this installation really uses.

The PrestaShop example also enables fastcgi_keep_conn on, uses 30-second read and send timeouts, and documents optional larger buffers for long responses. Apply those values only after checking that they match the PHP-FPM service and the response sizes you observe.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

A safe validation sequence

  1. Open the active Nginx virtual-host configuration and identify the location that handles the store’s PHP entry point.
  2. Confirm that the document root is the directory containing the PrestaShop installation, not a parent directory or a different release.
  3. Confirm that fastcgi_pass names a live PHP-FPM socket or upstream. The path must match the PHP-FPM service actually running on the host.
  4. Run Nginx’s configuration test before reloading. Correct any syntax or path error rather than reloading a known-bad file.
  5. Reload Nginx, request a harmless dynamic page, and check the HTTP status and error log.
  6. Repeat the TTFB measurements and compare them with the baseline.

fastcgi_read_timeout is not a speed control. It only changes how long Nginx waits before declaring that PHP-FPM has timed out. Increasing it can prevent a premature 504 while you investigate, but it does not make PHP execute faster. Likewise, FastCGI buffers control how response data is held in memory or temporary files; they help Nginx handle large headers or bodies and do not cure slow application execution.

Find PHP-FPM worker saturation

PHP-FPM is designed for heavily loaded sites, and its pool configuration often determines whether requests begin promptly. PrestaShop identifies pm.max_children as the key pool setting and says it must reflect the concurrent users you intend to simulate during a benchmark.

Recognize a saturated pool

When all children are busy, new requests wait in the PHP-FPM queue before any PHP code runs. Typical evidence is a high active-worker count, few or no idle workers, a growing listen queue, and TTFB that rises sharply under concurrency while CPU or database capacity may still remain. Confirm this with pool status metrics rather than inferring saturation from one slow request.

Size pm.max_children from memory and workload

Do not raise the limit blindly. Each PHP worker consumes memory, and more simultaneous workers can increase database connections, context switching, and contention. Estimate the memory available to PHP after reserving capacity for the operating system, Nginx, the database, and other services. Observe the resident memory of real workers during representative requests, then test a conservative limit under the expected concurrency. If memory pressure or swapping appears, reduce the limit or move database and PHP workloads to more suitable resources.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The pool mode and process-spawn settings also affect behavior, but changing several values together makes diagnosis difficult. Record the original configuration, change one variable, and run the same warm and cold tests.

Use the PHP-FPM slow log

PHP-FPM can write a slow log containing unusually slow scripts and PHP backtraces. Enable it for the relevant pool with a threshold appropriate to your baseline, reproduce the slow URL, and inspect which controller, module hook, database call, or external request is on the stack. Protect the log because traces can contain paths, parameters, or other operational details. Disable a very verbose setting after diagnosis if its volume is not justified.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

A slow log entry identifies where PHP spent time; it does not by itself prove that the web server is at fault. Correlate the entry with database timing, module configuration, and the request’s cookies and URL.

Investigate application and database delays

Once the Nginx path and worker capacity are sound, trace time inside PrestaShop. Common causes include slow database queries, expensive module hooks, cache misses, and remote API calls made during page generation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Database latency

Measure database time separately from PHP wall time. Look for queries that scan large tables, miss useful indexes, or become slow only when several PHP workers run concurrently. Check connection limits and lock waits as well as average query duration. A PHP pool that is enlarged beyond the database’s capacity can make TTFB worse by creating more simultaneous contention.

Modules and hooks

Disable or isolate one suspect module in a staging environment, then repeat the same URL test. Modules that run on every page, call a remote service, or perform catalog calculations can dominate TTFB even when the core front controller is healthy. Keep a record of the module and hook changed so the production rollback is precise.

Remote services

Payment, tax, search, analytics, shipping, and inventory integrations can add network waits to a request. A timeout setting may prevent an indefinitely hung request, but it does not reduce a successful call’s latency. Where the module supports it, move nonessential work out of the synchronous page request or use a short, observable timeout and a safe fallback.

Application cache state

Compare a cold application-cache request with a warm one. If only cold requests are slow, focus on cache population, filesystem performance, and invalidation frequency rather than increasing Nginx workers. Clear and rebuild application caches only during a controlled maintenance window; indiscriminate cache deletion can make every visitor experience cold-start work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Use FastCGI cache without exposing customer data

Nginx’s FastCGI module supports shared cache zones, selected cache methods, validity periods, cache locking, stale responses, and bypass or no-cache conditions. It can substantially reduce PHP work for public, cache-safe pages, but a shop cannot treat every GET response as public.

Start with anonymous catalog pages

Begin with anonymous product and category GET or HEAD requests that do not vary by customer, cart, currency, location, consent state, or authorization. Define a shared cache zone and a short validity period first, observe hit and miss behavior, and purge or expire entries when catalog or pricing data changes. Cache locking can prevent many concurrent misses from all executing the same PHP request at once.

Bypass private and commerce flows

Explicitly bypass caching when the request has a session or customer cookie, an authorization header, a cart or checkout path, a login or account path, or any other marker of personalized state. Nginx documentation specifically supports authorization headers and cookies as no-cache conditions. Also bypass when PrestaShop sets a response cookie or private caching directive. Treat currency, language, tax region, customer group, and consent variations as cache-key decisions, not accidental side effects.

Validate cache correctness

  1. Request a catalog page without cookies and confirm the first request is a miss and the next request is a hit.
  2. Add a normal customer or cart cookie and confirm the response is bypassed and contains the correct state.
  3. Add an authorization header and confirm it is not served from the public cache.
  4. Add an item to a cart, revisit the product and cart pages, and verify prices, stock, and cart contents.
  5. Log in, open the account and checkout pages, and verify that no response comes from the anonymous cache.
  6. Change a product or price, purge or expire the relevant object, and confirm that the next public request sees the update.

A high hit rate is not a success if a customer receives another user’s cart or account state. Functional verification takes priority over synthetic speed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Set browser caching for static assets

Browser caching is separate from server-side FastCGI caching. Appropriate expires and Cache-Control headers for CSS, JavaScript, fonts, and images let returning visitors reuse assets instead of downloading them repeatedly. This reduces repeat traffic and asset work, but it does not shorten the first dynamic PHP response that generates an HTML page.

Use a cache lifetime that matches your asset versioning strategy. If filenames or query strings change when a file changes, a longer lifetime is safer; if files are edited in place, a shorter lifetime avoids stale layouts. Test a returning browser after a deployment and confirm that HTML references the current asset versions.

Review access logging carefully

Access logging consumes CPU and I/O. Reducing log volume can lower overhead on a busy host, but logging also supports incident response, security investigation, capacity planning, and legal retention requirements. Change log formats, sampling, or retention only after confirming that the resulting records still meet your operational and compliance needs. Logging changes affect resource use around request handling; they do not make PHP code execute faster.

Use a supported PHP baseline before tuning further

PrestaShop 9 requires PHP 8.1 or newer and supports up to PHP 8.4. Its server requirements support Nginx 1.0 or later and warn against older, unmaintained PHP branches. A supported version can improve security and runtime behavior, but an upgrade can also expose incompatible themes or modules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Upgrade safely

  1. Inventory the active theme, modules, PHP extensions, cron jobs, and custom overrides.
  2. Check each theme and module for compatibility with the target PHP and PrestaShop version.
  3. Back up the database, uploaded files, configuration, and the current PHP-FPM and Nginx settings.
  4. Upgrade in staging first and exercise catalog, search, cart, login, payment, shipping, and back-office workflows.
  5. Clear the relevant var/cache/ directory after the update so stale compiled data does not mask the result.
  6. Restart or reload PHP-FPM and the web server as required by the package and service configuration.
  7. Repeat the TTFB and functional tests, then monitor worker use, errors, and database load during the production rollout.

If a new PHP version makes a page fail, revert to the backed-up configuration or supported previous version while resolving the incompatible extension, theme, or module. Do not leave an unmaintained PHP branch in place as a permanent fix.

Nginx versus Apache: what the available figures do and do not show

A PrestaShop vendor white-paper test from the 2010s reported 2,810 maximum visitors per hour on a single 4-vCPU, 15-GB-RAM SSD server with tuned Apache2, PHP-FPM, and MySQL. On the same stated hardware and workload, its tuned Nginx, PHP-FPM, and MySQL setup reported 2,390 visitors per hour.

Web server setup Reported maximum visitors per hour Test conditions
Tuned Apache2 with PHP-FPM and MySQL 2,810 Single 4-vCPU, 15-GB-RAM SSD server; 2010s vendor white-paper test
Tuned Nginx with PHP-FPM and MySQL 2,390 Same stated hardware and workload; 2010s vendor white-paper test

These two results are not a universal ranking. They describe one historical setup and workload, not every PrestaShop version, PHP release, database, cache policy, concurrency level, or network location. A fair comparison keeps the PHP version, PHP-FPM mode, database, hardware, cache rules, concurrency, geography, and page mix identical. Compare dynamic TTFB, throughput under concurrency, memory use, configuration complexity, cache correctness, observability, and the operations team’s familiarity. If your current Nginx stack is slow, fixing routing, worker saturation, database latency, or unsafe cache rules is usually more productive than changing web servers first.

A repeatable tuning and rollback workflow

  1. Baseline. Measure warm and cold TTFB and total time for anonymous catalog, cart, login, and checkout requests.
  2. Route. Verify the Nginx location directives, script existence check, filename parameter, and PHP-FPM socket or upstream.
  3. Observe. Capture PHP-FPM queue and workers, CPU, memory, database timing, cookies, and cache status during the same test.
  4. Trace. Use the PHP-FPM slow log and database diagnostics to identify the slow script, hook, query, or remote call.
  5. Change one thing. Adjust a pool limit, module, query, or timeout only after recording the old value and the reason.
  6. Cache selectively. Add FastCGI caching for anonymous, cache-safe GET/HEAD pages and test every bypass condition.
  7. Optimize repeat visits. Set browser caching for versioned static assets and review access-log overhead within retention requirements.
  8. Upgrade deliberately. Keep PHP in the supported range, check compatibility, back up, clear the relevant cache, and restart services when required.
  9. Re-test and decide. Keep the change only if TTFB improves without increasing errors, memory pressure, database contention, or incorrect cart and account behavior.

Symptoms and the most useful next check

  • All dynamic pages slow under load: inspect PHP-FPM active workers, queue depth, and pm.max_children before changing front-end assets.
  • Only one controller or module path is slow: reproduce it with the PHP-FPM slow log enabled and trace its hooks, queries, and remote calls.
  • Anonymous catalog pages are slow but private pages are normal: compare application-cache misses and database work, then consider a narrowly scoped FastCGI cache.
  • Pages are fast but large assets finish slowly: inspect browser cache headers, compression, asset size, and network transfer separately from TTFB.
  • Requests return 504 after a timeout change: verify PHP execution and worker availability; do not assume a larger timeout improved performance.
  • Customers see stale prices or another user’s state: disable the affected cache rule immediately, purge objects, and audit cookie, authorization, and cache-key bypass logic.
  • Performance improves after reducing logs but troubleshooting becomes difficult: restore the required fields or retention and use rotation or controlled sampling instead of eliminating evidence.
  • A PHP upgrade causes errors: restore the backed-up release, check theme and module compatibility, clear the relevant cache, and retest on staging before trying again.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.