Can't save settings, view JS codes and very slow at loading


#1

I had just installed Piwik (latest stable release). The configuration went well without any errors. Database is created. I’ve added one website and when I tried to update some settings, the “Save” button would not work, as well as Edit button near the website’s name on the “Websites” page. Here is what I got in the server’s error log:


2014-02-27 19:07:37: (mod_fastcgi.c.2711) FastCGI-stderr: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/***.com/piwik/vendor/tedivm/jshrink/src/JShrink/Minifier.php on line 274
PHP Stack trace:
PHP   1. {main}() /var/www/***.com/piwik/index.php:0
PHP   2. Piwik\FrontController->dispatch() /var/www/***.com/piwik/index.php:62
PHP   3. call_user_func_array() /var/www/***.com/piwik/core/FrontController.php:117
PHP   4. Piwik\Plugins\Proxy\Controller->getCoreJs() /var/www/***.com/piwik/core/FrontController.php:0
PHP   5. Piwik\AssetManager->getMergedCoreJavaScript() /var/www/***.com/piwik/plugins/Proxy/Controller.php:51
PHP   6. Piwik\AssetManager->getMergedJavascript() /var/www/***.com/piwik/core/AssetManager.php:185
PHP   7. Piwik\AssetManager\UIAssetMerger->generateFile() /var/www/***.com/piwik/core/AssetManager.php:290
PHP   8. Piwik\AssetManager\UIAssetMerger\JScriptUIAssetMerger->getMergedAssets() /var/www/***.com/piwik/core/AssetManager/UIAssetMerger.php:56
PHP   9. Piwik\AssetManager\UIAssetMerger->getConcatenatedAssets() /var/www/***.com/piwik/core/AssetManager/UIAssetMerger/JScriptUIAssetMerger.php:42
PHP  10. Piwik\AssetManager\UIAssetMerger->concatenateAssets() /var/www/***.com/piwik/core/AssetManager/UIAssetMerger.php:101
PHP  11. Piwik\AssetManager\UIAssetMerger\JScriptUIAssetMerger->processFileContent() /var/www/***.com/piwik/core/AssetManager/UIAssetMerger.php:113
PHP  12. Piwik\AssetManager\UIAssetMinifier->minifyJs() /var/www/***.com/piwik/core/AssetManager/UIAssetMerger/JScriptUIAssetMerger.php:87
PHP  13. JShrink\Minifier::minify() /var/www/***.com/piwik/core/AssetManager/UIAssetMinifier.php:59
PHP  14. JShrink\Minifier->breakdownScript() /var/www/***.com/piwik/vendor/tedivm/jshrink/src/JShrink/Minifier.php:134
PHP  15. JShrink\Minifier->getReal() /var/www/***.com/piwik/vendor/tedivm/jshrink/src/JShrink/Minifier.php:253
PHP  16. JShrink\Minifier->getChar() /var/www/***.com/piwik/vendor/tedivm/jshrink/src/JShrink/Minifier.php:300

As you can see, the JSMinifier library fails. Some pages work just fine, while others are broken.


#2

You need to set a longer max_execution_time = inside your php.ini config file on your server. This will increase the amount of time php has to execute long scripts, such as Piwik, recommend doubling it and trying again.

Rich


(Matthieu Aubry) #3

please use Piwik 2.1 as it makes archiving much faster so maybe it will work below 30 second