I am having an issue on a page which has a process that unfortunately runs a long time (4-5 mins). After the process I have a redirection to another page. What is interesting is that process actually finishes successfully ( but the sucess message doesn't show because of error) and the data is inserted etc. But the page does not redirect and I am getting this error on screen.
(http://prntscr.com/p79sfq)
There is no error message. When I inspect the page there is this: http://prntscr.com/p79u4g
http://prntscr.com/p79u4g
http://prntscr.com/p79uhh
The debug log does not show anything out of the ordinary:
http://prntscr.com/p79w48
Is the process or something timing out? Is there any setting or any way this could be prevented from happening.
Related
I am just getting started with Play Evolutions and I find it pretty tough to figure out why they fail and leave the DB in an inconsistent state.
In Dev mode it will display the error in the default HTML page but it does not say which statement failed. This is also problematic since for this particular application I only have REST APIs that return JSON and so an HTML error is not appropriate. I have my own error handler so I will probably end up matching on ExceptionAttachment and pull out the content/script myself and escape that in the JSON error response. However this is only in DEV mode since I would not want this going back to a real user in PROD.
More frustrating is that it doesn't even log the statement when it fails. I can enable logging for my driver but once the failure has occurred it is too late to then go and enable logging.
Is there anyway to get a more specific error in the logs when an evolution fails?
We're using "burst_pdf" conversions and they have been working fine until recently.
However, since two days back all jobs fail, and looking at the Blitline dashboard we see that queued jobs fail with the following error:
"Image processing failed. comparison of String with 1.2 failed"
Also, the error messages say:
"Original Photo Metadata -> null", but I'm not sure if that's related to what's causing the errors.
The original submissiosn to the queue work just fine and we get a valid response back from Blitline. However, we no longer get any postbacks, even though I was expecting one even if a job fails (to notify us that an error occured)?
Have reached out to Blitline for help but haven't heard anything back yet.
Turns out this was due to a Blitline bug which has since been fixed.
I have once ajax call which does connect to database, sets one flag in database and waits for one file to be created by some other process which looks up the flag.
Till the file is created on server, ajax keeps waiting. Once file is created, ajax reads the file and displays the content.
Now issue is that sometime the backend process which creates the file, stuck into socket issue, and never created the file, but ajax keeps waiting in that case, which gets timedout only when its timeout occurs,
What all I want to show a stop request button, which could stop current ajax request as timeout is long, and user could want to stop it prior to timeout.
Here is what I tried, I modified the code which keeps looking the existence of file, and added a session variable check , like if Session("AbortCheck") = true then exitout from the script.
and placed another ajax call to update the sessin variable so that on loop when the script will find session = true it will immediately stop the request.
While debugging I found that my my new ajax request which updates the session variable actually executed only when the first ajax is completed. and therefore its never stopped on user request to stop the request.
Could anyone let me know how to stop a running ajax (which is taking time) on user input ?
Thanks
Maybe you could implement some error management in your AJAX script instead of letting the user manages that.
'Try to open the socket here
on error resume next
if err<>0 then
Response.Write("1")
else
Response.Write(fileContent)
end if
Then you get the caller script notifies the error to the user if the AJAXs script returns 1.
I have fixed the server side execution by removing the loop from server side which continuously checks for file, and put a loop in js file to re check the same, and for handshake , if file is not found on server, I pass message as waiting to ajax and another flag for abort check from jquery, which solved the issue.
I have a strange problem with using ajax post requests. I use the request to run an ImageMagick process directly on the command line by using php function exec(). The process takes about a minute, and then responds with some variables. This is working fine, except from one problem. During the execution time I cannot excess other parts of the website that are installed on the same webserver (as if the server is unreachable). When the process finishes, everything works fine again.
I first thought this to be due to an overloaded server. However, when you access the website via another browser, there are no problems, even during the execution time of the process in the other browser. So it looks like the problems has something to do with browsers blocking other requests during the post request.
Could anyone help me out here? What could be the root problem?
Found the solution! Thanks from the help by kukipei By adding session_write_close(); to the file of the ajax request (after is has read the userid and token), the session file is no longer locked, and all pages are accessible again. Problem was that the session was locked during the whole execution time of the process, which was not necessary, since I only needed the session to read the userid and token. So before calling the ImageMagick operation, I now add session_write_close()
I'm trying to implement a chat app that uses long polling to get messages from a remote (cross domain) server.
Is there any way to do this with a XDomainRequest? It seems my connections always get terminated after a random amount of seconds/miliseconds (usually about 1-3 secs) instead of waiting for the server to respond.
The IE dev toools thell me that the request has been "aborted" with no data received.
Is the XDomainRequest just not fit for long polling or am I missing something here?
Had this problem too, as a race condition, using the jQuery iecors library. The IE network console showed the request as "abort" despite Fiddler showing a 200 response.
After a few stubborn rounds of googling, I came across this link which recommends filling out all the callback handlers. I suspect that onProgress was only being called, and failing, when the request was slowed by a heavy page, leading to my race behavior.
IE9 XDomainRequest issued requests may abort if all event handlers not specified
For jquery.iecors.js, it was missing the onprogress handler, in addition to a few variable name typos. Adding this line seems to fix it.
xdr.onprogress = function () {};
For me the issue dealt with multiple query functions running as a single batch function using XDomainRequests. WebTools showed all requests to the remote server would abort but the last. Running with alert(query) before each query worked. So I ended up moving my XDR invocation (e.g. new window.XDomainRequest) inside the loop so a new instance would be created for each query to the remote server. Each result is inserted into an different input box via getElementById(id).value. With a delay timer added I can see it runs sequentially filling in each value now with no issues. Without delay it is virtually instantaneous.