Report this

What is the reason for this report?

What would cause these odd spikes in bandwidth usage?

Posted on January 13, 2017

I’m getting weird spikes in bandwidth, disk, and CPU usage. What could be causing this? It’s a pretty standard LAMP stack. Only a few days old. http://i.imgur.com/DcDXtdH.jpg



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

@jacksonwages

When you deploy a droplet, the initial deployment and setup is going to cause CPU, RAM and Disk I/O spikes. This is completely normal and once the droplet is a week old, or older, the graphs will begin to normalize.

Check your log files in /var/log

Heya,

The sudden change in the web traffic and the bandwidth usage can occur due to many reasons. The first place to check will be the web logs, e.g Apache/Nginx etc. However, there are several things you can check to get additional information.

You can follow these steps:

Monitor and Identify the Source:

Use system monitoring tools like top, htop, or iotop to identify which processes are causing spikes in CPU, memory, and disk usage. Examine Your Application Code:

Inspect your PHP code for any inefficient database queries, infinite loops, or other performance bottlenecks.

Check if there are any recurring or resource-intensive cron jobs running in the background.

Update and Patch:

Ensure your server’s operating system, LAMP components, and any third-party software are up to date with the latest security patches.

Security Measures:

Check for unusual login attempts, as this could indicate a security breach.

Review your Apache configuration for any misconfigurations that could lead to excessive resource consumption.

Traffic Analysis:

Analyze your web traffic to see if sudden spikes correlate with increased website visits or other patterns.

Resource Allocation:

Verify that your server’s resources are sufficient for your application’s needs. It might be necessary to upgrade your server if it’s constantly under heavy load.

Third-party Integrations:

If your application relies on third-party APIs or services, check if issues with these services are causing the spikes.

Load Testing:

Consider running load tests to simulate traffic and see how your system responds. This can help identify weaknesses under high load.

External Attacks:

Monitor for signs of a Distributed Denial of Service (DDoS) attack or other malicious activity that may be causing the spikes.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.