However beyond joining 14 PDF files I get errors every time (error is ... convert: Postscript delegate failed), the pdf join is always limited to 14 PDF's, no matter what pdf files selected, the PDF files exist in the correct location and are not corrupted. The outputted joined PDF file only ever has 14 of the joined files. I've tried uninstalling ghostscript and ImageMagick and reinstalling via SSH but the issue persists. I've tried the script on three separate servers and get the same result. Troubleshooting with my hosting provider they said the server resources were not stretched during the operation and they believe the issue lies with ImageMagick.

How do I resolve this? Or are there alternate methods to join pdf's using ImageMagick which don't have issues of limits?

Below is the relevant snippet of conversation I had with the hosting provider...

Client: how do I uninstall/reinstall 'Ghostscript' via SSH?
Hosting: yum remove ghostscript ... Now did that also remove ImageMagick?
Client: ok removed
Hosting: then ... yum install ghostscript ... once that is finished...yum install ImageMagick
Client: ok done
Hosting: Then restart server. This should handle whatever issue you are encountering...Is there anything else I can do for you today?

Client: I get the following error when I try to join more than 14 pdf's...

So here I tried to join 16 pdfs, but the final 2 pdf's gives the above error on those pdfs. Those files 100% exist and are not corrupted. No matter which PDF's I select to join, any pdf's selected beyond 14 always get the above error on them, every time. Is this a limit of the server resources?

Hosting: Looking over, it looks like this is a problem with the program itself, not really the server. I'm not seeing anything we can do on our end, I would contact the creator of the program and seek support.
Client: Just to confirm, the resources of the server were not stretched during the pdf join operation a few minutes ago ie, memory, hard drive space, cpu limits?
Ryan S: Not that I can see on my end.
Client: Thanks, will go to their support forum with info

IM is at 6.9.9.14. (so over 250 versions old) (unless there have been patches).

My GS is

gs --version
9.21

You probably exceeded one of the policy.xml limitation (perhaps tmp space). But you can edit the policy.xml file (or your hosting provider can do that, if they are willing). See the link at http://www.imagemagick.org/script/resources.php to policy.xml