skip to Main Content

I have a site with laravel and vuejs.
I dont have access to my programmer and this error occur when function takes more than 2 minutes

500 Internal Server Error
Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase ‘Connection Timeout’.

I searched and i found to have change .htaccess
my .htaccess was:

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php5_module>
   php_flag asp_tags Off
   php_flag display_errors Off
   php_value max_execution_time 1200
   php_value max_input_time 1200
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 1024M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php56"
   php_value upload_max_filesize 1024M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag asp_tags Off
   php_flag display_errors Off
   php_value max_execution_time 1200
   php_value max_input_time 1200
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 1024M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php56"
   php_value upload_max_filesize 1024M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

i changed it to:

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule Litespeed>
 RewriteEngine On
 RewriteRule .* - [E=noabort:1, E=noconntimeout:1]
</IfModule>
<IfModule php5_module>
   php_flag asp_tags Off
   php_flag display_errors Off
   php_value max_execution_time 3000
   php_value max_input_time 3000
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 1024M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php56"
   php_value upload_max_filesize 1024M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag asp_tags Off
   php_flag display_errors Off
   php_value max_execution_time 3000
   php_value max_input_time 3000
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 1024M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php56"
   php_value upload_max_filesize 1024M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

but error is still not fixed. Do I have to do anything else?

2

Answers


  1. Chosen as BEST ANSWER

    I checked

    storage/logs/laravel.log
    

    but there isn't any error about it. I have two questions? Is this error related to Laravel or Vue? How do I increase request time out? I can't optimize my code more.


  2. You can increase the php max execution time, but that is not a good approach unless is really needed.

    Check the

    storage/logs/laravel.log
    

    To se what is the actual issue on the code, it might be a time out if that is the case try to see if you can do something in the code to be more efficient, If this is a report that might take long time to execute, you can also consider creating a command.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search