Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a very simple server running WAMP on a Windows machine, with PHP code which is a simple API for my clients that returns XML. The things is that the hardware is very modest, and if a user calls the link to the API and hits F5 many times (calls the link repeatedly) the server performance goes down a little (response time goes up). Is there a way to limit the queries to port 80?

I know how to limit this in the the PHP code, but I think is not a good practice because even if I limit the queries on the PHP code the query is already made, and I'm consuming resources checking with PHP.

share|improve this question

closed as off-topic by Tom O'Connor Aug 14 '13 at 20:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

    
If your server is being brought to its knees by more than a couple of concurrent connections, I would advise taking a long look at your code and seek out opportunities to optimize (especially your database calls). Can you define "modest" hardware and also let us know which version of Windows you're on? –  Justin Scott Jul 8 '10 at 0:57
    
In addition to what Justin stated, I would also suggest that you re-examine the hardware that the web site is running on. If it can't handle more than a few requests, something is lacking either in the code or the hardware. –  joeqwerty Jul 8 '10 at 2:34

1 Answer 1

That's a rather easy one.

Install the apache mod_limitipconn and setup a vhost for your domain. This will limit how many connections a user can have to that vhost.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.