There’s a PHP script temeout that applies to any request, AJAX or not. It usually defaults to 30 sec., but can usually be altered with ini_set(). If not, it has to be set in php.ini.
There’s also a script memory limit that can be exceeded when processing large amounts of data. Additionally, there is a max. file upload size (“upload_max_filesize”), which I think is what you are running up against since the file size limit is a nice even number.
These limits should also be able to be overridden with ini_set(). Again, if that does not work, the change needs to be in php.ini. php.ini changes normally require a server restart to take effect. If you are on shared hosting and ini_set() does not work, check with your host about upping the limit.
Thanks for the anserwer. Here are my specifications for my localhost:
max_execution_time = 3000
memory_limit = 8G
upload_max_filesize = 100M
I think normaly that’s enought or?
Your missing:
post_max_size = 32M
and if you do not want to edit php.ini, the only way to do this with big files is to upload before the file, maybe chunking it, so processing on server and removing, after the conversion process has been completed?
@potentdevelopment
post_max_size = 100M
@axew3
befor the script converting each site as .jpg the PDF file is uploaded to the wordpress media files. The upload is no problem. Only the converting process.
I have checked the script with xdebug. Now i can see. At the end of the PHP Script there is an wp_die(); this one start the script from the beginning. Anyone know why?
That is normal for AJAX handlers because once the response is sent out the AJAX request has completed and there is nothing left to do. The continuation of a process needs to be handled elsewhere, either in the originating jQuery, or within a PHP loop prior to wp_die(). Failure to terminate an AJAX request will leave process threads open, eventually crashing the server.
@bcworkz
Thanks for the answer. The problem is fixed. But now i get in Chrome as Statuscode 200 but in Firefox nothing. Do you have an idea?
The server should be responding the same way regardless of your browser, I imagine Chrome is being more helpful while FF remains quiet since 200 means all is fine. Depending on what you’re looking at, this may be fine or very odd. I think there is not much to worry about as long as the server is responding correctly.
Okay Thanks for the anwsers