What does his error mean and how do I solve it?


Fatal error: Maximum execution time of 30 seconds exceeded in /home/aaa/public_html/framework/db/CDbCommand.php on line 485

I am getting the above error.

How do I solve it?

This means that your script runs for more than 30 seconds…

FIrst of all you need to check your script to see why it takes so long…

If the code is OK and your script needs more than 30 seconds… you need to set the "max_execution_time" to a heigher value…

you can set it in the php.ini or if not possible try with ini_set()

optionally you can use set_time_limit() php function to redefine max execution time for your current script. if you call set_time_limit(0); your script can spend infinite time to finish he work. but usually this error shows some logic mistakes in the code, such as infinite loops checking incorrect conditions and so on.

I got this error when my script was copying TinyMCE files into assets folder on Windows XP (publishing assets). On Linux it runs much faster (almost instantly). The solution is to put this line into index.php:




set_time_limit(0);



but don’t forget to remove it in production.