modify JSON response time

Tamer Aljabali

New Member
hi there

i'm making something to check emails over API checker while importing .

i use CURL_MULTI function to preform Multi-Threaded checking .
by injecting the checking code in the file : /apps/customer/contollers/List_importController.php


now when the ImportAtOnce Value less than 10 .. every thing work good


but once i make it more than 10
the JSON page render not wait for the curl process to finish
and give me messege "internal server error" after 30 sec

i wonder if i can make the time out value more than 30 second

and from where ?

thank you
 

twisted1919

Administrator
Staff member
Hey,

You can increase the timeout from your web server configuration.
My hunch is that running so many processes in parallel will leave your server without memory and you end up with that error ;)

Thanks.
 

Tamer Aljabali

New Member
could you please provide me with some good article for that ..
i dont know from where i can increase the JSON time out value.
thank you .
 

Tamer Aljabali

New Member
thank you but i think this is not what we are looking for here ..
my php.ini config already have a big value for the variable (max_execution_time) approx. 24 hour

im talking about the JSON response handler timeout,
and i think it's hard coded in the php source but i dont know where is it exactly.

because the overall process i get all the emails checked successfully
but the JSON handler not render all the output of the checking process .
 

twisted1919

Administrator
Staff member
Ah, i think i know what you mean.
Can you please open the file apps/common/helpers/AppInitHelper and look for
PHP:
public static function simpleCurlGet($requestUrl, $timeout = 30)

and make it:
PHP:
public static function simpleCurlGet($requestUrl, $timeout = 120)
We basically just change the default timeout here for remote calls.

Then retry your json stuff.
 

Tamer Aljabali

New Member
thank you very much
im not sure if this is going to work .. because i didn't use YII simple-curl in my implementation .. i use normal php curl insted
but let me get deep inside more bit.

in the import process (by txt)
the mailwizz move the client to an output page that rendered asynchronously by json for the out put
now as i know .. json have to refresh and render the new changes in the ovrall progress till the import process finish .

now the refresh process it self .. have a time out of 30 second .. if this limit exceeded .. the output will be (internal server error) its normal string with red color rendered by json .
now im looking to change this limit exactly .


this problem also happens when i make the (import at once) very big .. app. 10000

this error also happens and i get internal server error string by json before the first 10000 email end the import

that timeout value what i need to change

i hope you get my explanation now .
and thank you again for your time
 
Last edited:

twisted1919

Administrator
Staff member
now the refresh process it self .. have a time out of 30 second .. if this limit exceeded .. the output will be (internal server error) its normal string with red color rendered by json .
now im looking to change this limit exactly .
This is really the web server that dictates the timeout of the page, so the above links should help...
If that doesn't help, maybe sites like stackoverlow can, because i don't seem to figure it out.
Thanks.
 
Top