Question
What are the best Apache configurations for an API?
I have the $20/month server and I am hosting a sales page, user panel and API.
The API gets a lot of traffic and the static homepage too. The entire site, all 3 parts, are built with Django/Python with Apache.
The settings I’m running are:
Timeout 10
MaxClients 75
MaxRequestWorkers 512
ServerLimit 32
Daily average traffic stats:
1500 Page Views
500 Unique Visits
200 First Time Visits
300 Returning Visits
The server will go down about once an hour for 1-2 minutes. Are there any configurations I should be using or considering?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
@macdonjo I’m not sure I understand the “The server will go down about once an hour for 1-2 minutes”. So you’re saying that every hour, the server doesn’t work or respond with errors?
If yes, can you please provide the logs of Apache, Django and (I’m guessing) MySQL, from when the problem occurs, since that will give us something to work with.
For a $20 droplet, it should be able to sustain multiple thousands of visits every hour without any problems - unless your application is very heavy or slow to respond.