script timeout diagnosis

murraybiscuit

Executive Member
Joined
Oct 10, 2008
Messages
6,483
Reaction score
55
Location
Dubai
i've done a signup on a site which sends data to a remote server via post, does a db write and displays a response.
there's very little data being sent and returned between servers.
there's not much traffic.
the script on my side is via http:80, using post (i've tried with and without curl, soap and regular http post etc etc from my side).

problem is that my script times out after 30 seconds waiting for a response.
most of the time it works, but then suddenly a batch of submissions fail.
i know the data is being submitted because i can see the remote db has been written to.
the developers on the other side have logged script execution times and assure me that their script is terminating correctly.
i could extend my timeout, but i honestly don't see anyone waiting for 40/50 seconds and upwards just to submit an ajax form.

what's the best way of diagnosing this?

i've hosted my script on two other servers, one local one in the US and am still getting the issues from those servers as well, so i can't see how it could be a problem my side.
 
Did you try a packet sniffer maybe like WireShark to see traffick going in and out?
 
i was thinking along those lines.
i'll see if i can make it reproduce it on my localhost and see what wireshark shows (if anything).
this packet sniffing stuff is a bit above my head, i must admit.
 
It’s easy, what you do is assign WireShark to the interface going out of your network (your local server). Then run the script and wait for a response.

If you receive no DB packets (you’ll recognize them as they look the same as when the data was send out from your server) back before the script times out you can safely say the problem is on the remote server/network.
 
if you're using AJAX be aware of SOP (Same Origin Policy), this may be preventing the POST request and jamming the browser, though it shouldn't really...
 
Top
Sign up to the MyBroadband newsletter
X