Jump to content

Suspected Lock


jaymc

Recommended Posts

I have a php script which connects to MSN via a socket

When doing this, it sometimes lags for over 40 seconds...

When this happens I cant access any page on my site from where the script was requested (via popup) untill I restart apache

My best guess is that when that script is running and causing the lag it puts some kind of lock on any request that has come from the same page the popup did (http socket?)

I think Im on the right lines, but does anyone else have a better explination and solution

Cheers
Link to comment
Share on other sites

I had a similar problem while testing ajax code on ie.  I would be locked out of the site until I cancelled all of my browser instances.  That was about the scaryest web site disfunction I every saw. 

Come to find out, ie has a limit of 1 (or 2?) open http connections per domain name.  If they are already in use you are completely locked out of going to the site.  Cancelling all instances of the browser always worked(makes sense, the connection would be dropped).  I ended up putting a lot of error resetting/ ajax auto-aborting(), in the code because of ie and this problem.  The problem does not occur with firefox. 
Link to comment
Share on other sites

Ahhh yes that would make sense !!

However, I have a network and when running the script on my laptop, whilst locked I quickly tried to access a page on my desktop and that was locked out also

However, if I open a new browser window I have no problem

It appears that the lock is only for people connected at the time of the 'lock'

Anyone connecting while the 'lock' is in process gets through fine..

Its as if its locking out any current connections it has?
Link to comment
Share on other sites

How does that explain the other PC also locking up...

Basically, anyone connected to the site before the script is run will be effected by the lockout.. theirfor their must be more to it than a local pc browser issue

Thats what I cant get my head around?
Link to comment
Share on other sites

Additional

I have another script that queries a database and that sometimes gives 3 seconds lag..

That is also crashing the site... so I think it must be a MYSQL lock...

Any ideas on that?

[b]I think it may be because the query is taking 100% disk IO on the database this not allowing the heads to search for other queries until that one is complete...[/b]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.