Q:

Usage 100% for upload file on server

I have operation on website application, where you can upload CSV files (max size of files 40mb). When I was uploading 4th file, the server crashed and the CPU usage was 100%. The first 3 files was uploaded ok. I reboot the server, but this site where you upload files, don´t work (500 error is shown). 
Now I have 2 problems:

How to reduce the CPU usage for that operation.
How to make site work.

Thanks for your help.

A:

File uploads can not be the reason for server crashing, may be the process of uploaded file hogging your CPU memory. You might be doing some heavy operations on database or other services which might be causing this problem.

Check for apache & mysql log files
Check the CPU performance using top command to check the load while uploading
Once upload of single file is done, check again the load on server
Compare both results and keep checking log files, you will get your root cause.
You can use newrelic or appdynamics to monitor the load.

