Generating Large PDF Catalogs

If you have many products like above 500 or many products in multiple categories, the full catalog may stop rendering and gives you a 500 / 504 error. However the category catalog still works (of course dependent on the amount of products inside a category).

So if you want to create the full catalog with many products, you need full server access and your server should have a good configuration. Do not try it on a 512mb RAM cloud server. But before optimizing your server you can try changing our plugin configuration.

Plugin Configuration:

  1. Disable Variations (looping through all variations is a huge task)
  2. Disable QR Codes (Generation & Rendering takes time)
  3. Disable product Gallery Images OR set a smaller Gallery image size type (e.g. thumbnail)
  4. Set small Product Images & Category Image Size Types (e.g. shop_catalog image size)
  5. Turn on Performance Options
    1. Use Images Locally
    2. Enable Caching
    3. plus the rest
  6. Decrease Cover Image sizes

Server Optimization:

  1. Switch to PHP8 if you haven’t yet
  2. Increase memory_limit in php.ini
    (if you see errors like Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 54 bytes)
  3. Increase max_execution_time in php.ini
    (if you see errors like PHP Fatal error: Maximum execution time of 30 seconds exceeded in ..)
  4. Increase fastcgi_read_timeout in nginx / apache
    (if you get a 504 error)
  5. Look into your error logs …

Example:

nginx:
fastcgi_read_timeout 600

php:
max_execution_time 600
memory_limit 512MB

 

With this config we were able to create a catalog with more than 500 pages. 370 products assigned to multiple categories.

2 thoughts on “Generating Large PDF Catalogs

  1. Bob says:

    Performance is crippling this plugin on my site. I have turned off all features and still getting 502 errors. I turned on ALL performance options and still 502. I will work with my host to see about the server-side settings. But This plugin doesn’t seem to scale that well. We are looking for a master catalog that could be built in the background and published daily. We don’t need ad hoc catalog creation which is expensive from a performance standpoint. We will need a refund if we can’t get this working.

    We have over 2000 products.
    But we left out out of stock products from the catalog.
    Variations are turned off as is most of the data options (we only have thumbnail, title, short description).
    Many products are listed in more than one category (we have a two tier category).

    Is there any way to ONLY use the primary product category for any one product? That would reduce the cross-listing of products.

    Thanks!
    Bob

    • WeLaunch says:

      If you have all products in multiple categories, why don’t you use the category catalog only? Makes no sense to generate a large catalog where all products are duplicate …

Leave a Reply

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