Jump to content

PHP Curl Locking Up Site


lampstax

Recommended Posts

Hi guys,

 

Posted this in the #help IRC but getting no reply, so reposting it here. 

 

I'm having a weird issue with CURL .. hopefuly someone can help.

 

Basically the app calls a few external url to retrieve xml and add to the db.  Some API are slower than other so we should technically be using curl_multi, but for now, still just using normal curl.

 

However, while retrieving the XML, curl seems to block all other HTTP connections to the site.  By blocking the request, I mean other requests to the site ( completely unrelated portion of the site ) just get a 'loading' message until the curl finishes, then the other requested page loads.

 

We have two domains on the same physical machines ( live env and dev env ).  I've verified multiple times that CURL is not actually blocking request to the entire server.  When CURL is executed on dev, live still loads, and vice versa.

 

Google doesn't show anyone running into anything similar to this.  So this might be a pretty obscure issue.  But it seems like this would be a big issue if it was a problem with CURL so this might be a shot in the dark.

 

Does anyone know if there is a curl_setopt option missing or something that causing this behavior ?

Link to comment
https://forums.phpfreaks.com/topic/202453-php-curl-locking-up-site/
Share on other sites

could be something as simple as limited number of allowed concurrent HTTP connections in your browser.

 

Sounds like the HTTP are just running in a sequential order which is normal.  work on getting your cURL execution time down, and I'm sure things will iron themselves out.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.