Jump to content

Enabling js smart cache prevents page from loading.


DFuentes

Recommended Posts

I had been developing some modules for my store's backoffice and suddenly my store won't load. I get the following message:

 

"Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\<my site>\tools\js_minify\jsmin.php on line 309"

 

The number of the line changes, but the message and the file is always the same. If I disable the 'Smart Cache for JavaScript' option in Advanced Parameters > Performance > CCC, the page takes a few secconds but loads.

 

When it is enabled the backoffice works perfectly, it is only a front problem.

 

What could be the cause of this?

Edited by DFuentes (see edit history)
Link to comment
Share on other sites

to determine if non-prestashop you can toggle, the disable non-prestashop modules and/or overrides 

 

back office-->advanced parms-->performance

 

then see if issue still persists.

 

Note: on chrome you can use ctl+shift+j then click console to see .js errors for example.  |  Also you can enable PrestaShop debug mode (google if you do not know how)

Link to comment
Share on other sites

Tried disabling non-prestashop modules and overrides (each one and together), same result.

 

The js console is empty, doesn't even have usual errors, from which I assume it is not loading the page at all.

 

Dev mode is enabled, that's how I got to see the error I mentioned in the first post.

Link to comment
Share on other sites

After reading some websites I increased the server's loading time to allow my site to load and it worked, but still took a few minutes for it to work.

 

In the end I managed to solve it, the problem was xdebug. I changed

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = on
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"

to 

;[XDebug]
;zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
;xdebug.remote_enable = on
;xdebug.remote_handler = "dbgp"
;xdebug.remote_host = "127.0.0.1"
;xdebug.trace_output_dir = "C:\xampp\tmp" 

in the php.ini and the site went back to normal.

 

It's not the best solution since I have to comment it for the site to be fast and then uncomment it to debug my modules, but it solves my problem.

Any better solutions will be appreciated.

Edited by DFuentes (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...