I have a server. It has a website. On a site I try to load a large Excel file. The file is loaded, but when it starts writing to the database, a 500 error is knocked out.

How can you track because of what it arises? Maybe the parameter should be some change or what

OS: Debian 9 CP: VestaCP apache+nginx mysql 
  • one
    The error log is on the server and usually a description of the errors that occur is written to it. - Visman
  • apache logging levels and location of conf. files : ruhighload.com/… - theblackpost

1 answer 1

So put it in the nginx settings (settings of your site):

 error_log /var/log/nginx/nginx_error.log warn; 

And this is how your site’s Apache settings:

 ErrorLog /var/log/httpd/error_log 

So you will display errors in a separate file and you can see the error and fix it.

I can also advise for nginx to increase the size of the request, or rather the size of the body:

 client_max_body_size 8M; 

This must be entered in the /etc/nginx/nginx.conf file. For php, you can do the same thing.

 upload_max_filesize = 40M // для файла post_max_size = 40M // для запроса 

It is necessary to enter in the file / etc / php / <your version of php> /apache2/php.ini

Well, this is naturally the original things. We must first smoke logs.