Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8527335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:31:45+00:00 2026-06-11T08:31:45+00:00

I have got an PHP application running a report and firing off about 1

  • 0

I have got an PHP application running a report and firing off about 1 million SQL queries to SQL server within 90 seconds. During the period of time no one else can use this web-based application – the egg timer is rolling but nothing loads until the report is timed out or completed. I tested this problem in an isolated environment with just myself in there, ran the report in a browser, then any actions from other browser windows to this application site hung.

Some details about the testing environment:

Windows 2008 R2 x64 - IIS 7.5 - PHP 5.3.8 via FastCGI 
Windows 2008 R2 x64 - SQL Server 2008 R2 x64

FastCGI settings in IIS:

Instance MaxRequests = 200
Max Instances = 16
Activity Timeout = 70
Idle Timeout = 300
Queue Length = 1000
Rapid Fails PerMin = 10
Request Timeout = 90

Each of the SQL requests completes less than 60ms on the SQL server side. CPU loads of both of the Web server and the SQL server are less than 10%. The Web server has 16GB RAM and about 60% RAM are available when running the report.

It seems that, PHP’s been firing off too many requests to the SQL server and becoming too busy to handle other requests. If this is the case then there should be something I can tweak to make PHP handle more concurrent requests.

Does anyone know? Please help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:31:46+00:00Added an answer on June 11, 2026 at 8:31 am

    I’ll just stab in the dark here and assume it’s due to session locking.

    When you use the standard session handler that comes with PHP, it makes sure that your session files cannot be corrupted by using (advisory) write locks throughout the course of your script’s execution (unless session_write_close() is called earlier).

    Other scripts that try to access the same session (your browser would pass the same cookie value) will wait for the lock to get released, as long as it takes.

    You can verify this by using two completely different browsers to simulate two users (one runs the report, the other accesses the site). If that works, you’re pretty sure it’s due to session locking.

    This shouldn’t be a problem, because you will know when you’re running a report, but if this might cause issues nonetheless you can consider two things:

    1. don’t start a session for the report script (but this also means unauthorized users could try to run your report script)
    2. close the session before your grunt work starts, by using session_write_close() after you have verified the user’s identity.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a PHP Facebook application that's running in an iFrame, and under https.
I have got two pages. example.com/php.com and example.com. I use this function to set
i have got <div><a class='link' href='index.php' data-container='target'>Load</a></div> <div class='target'></div> i need to write jquery
(I am using json with PHP) Hi i have got a url, from some
I've got question to you. I have got two project in PHP that uses
I am generating a rss(xml) output form a php file. I have got a
I am programming in PHP mysql. I have recently got into OOP programming. So
I have a dynamic drop down box which calls another PHP page. I've got
I have got a form (php in html or the other way around). Once
I've got a very old php application (1999) that has been worked on during

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.