Issues with Timeouts and Server Errors when Uploading Files or Saving Pages

  • Hi,


    We set up a relatively basic site for a customer.

    When we try to upload a PDF (only 2MB), the file seems to upload as normal, but at the next stage, we receive an Internal Server Error at /perch/core/apps/assets/edit/


    We have uploaded a series of other PDFs without issue and there is still plenty of space left on the server. We have also set quite a high timeout so I'm not sure what is causing the issue.


    The PDFs are complex architects plans - would there be a problem with the system generating a thumbnail from a complex vector cover?

  • drewm

    Approved the thread.
  • I see the following set of errors in the log files - not sure if any of these shed light on the issue?

    Code
    1. [Tue Jul 2 08:05:44 2019] [error] GPL Ghostscript 8.70: Unrecoverable error, exit code 1
    2. [Tue Jul 2 08:05:07 2019] [error] [client 89.100.252.58] malformed header from script. Bad header= %interp_exit .runexec2 : php-cgi, referer: http://domainname.ie/perch/core/apps/content/edit/?id=18
    3. [Mon Jul 1 11:59:15 2019] [error] * Connection #0 to host activation.grabaperch.com left intact
    4. [Mon Jul 1 12:00:04 2019] [error] GPL Ghostscript 8.70: Unrecoverable error, exit code 1
    5. [Mon Jul 1 11:59:44 2019] [error] [client 93.107.43.78] malformed header from script. Bad header= %interp_exit .runexec2 : php-cgi, referer: http://domainname.ie/perch/core/apps/assets/edit/
    6. [Mon Jul 1 13:24:25 2019] [error] * Connection #0 to host activation.grabaperch.com left intact
    7. [Mon Jul 1 13:23:06 2019] [error] [client 89.100.252.58] Script timed out before returning headers: php-cgi, referer: http://domainname.ie/perch/core/apps/content/edit/?id=14
    8. [Mon Jul 1 13:24:52 2019] [error] [client 89.100.252.58] Script timed out before returning headers: php-cgi, referer: http://domainname.ie/perch/core/apps/content/edit/?id=16
  • It does look like some issue with the thumbnailing. Ghostscript is the open source postscript implementation that Imagick uses to read PDF files to create an image thumbnail.


    It's not likely something you or I can fix directly. If you have GD available, you could disable Imagick, which would prevent Perch from attempting to generate a thumbnail.

  • Hi Drew. Thanks for the response. Unfortunately I don't have the required access. The site is run on a shared server and I was told that they can't disable ImageMagick as it would disable it for everyone :-(


    Thank you for everything though. If needs be, I'll place their future sites on private servers which should hopefully prevent the issue.