Hi,
So I’m fairly new to Yii, even though I built some sites years ago on Prado.
I have a current problem where on a POST, my page can take up to a minute to perform the “Loading clientScript application component” task. Originally I thought my database had some sort of issue, but after putting tracing on I can see that isn’t the case, and the clientScript (system.CModule) task is what is taking forever to complete. It’s strange because sometimes it works in milliseconds, sometimes a few seconds, and other times up to a minute.
Here’s a trace example:
[i]17:37:19.657463 profile system.db.CDbCommand.query
begin:system.db.CDbCommand.query(update users set role_id = 2, featured =
1, first_name = ‘Boydlee’, last_name = ‘Pollentine’, username = ‘boydlee’,
password = ‘blah’, user_photo =
‘http ://a0.twimg.com/profile_images/1743928419/efad18b1-bfd0-49a9-a1ef-271f402084ad_normal.png’,
twitter = ‘boydleep’, email_address = ‘boydlee@gmail.com’, show_user = 1
WHERE user_id = 41)
17:37:19.657874 profile system.db.CDbCommand.query
end:system.db.CDbCommand.query(update users set role_id = 2, featured = 1,
first_name = ‘Boydlee’, last_name = ‘Pollentine’, username = ‘boydlee’,
password = ‘blah’, user_photo =
‘http ://a0.twimg.com/profile_images/1743928419/efad18b1-bfd0-49a9-a1ef-271f402084ad_normal.png’,
twitter = ‘boydleep’, email_address = ‘boydlee@gmail.com’, show_user = 1
WHERE user_id = 41)
[b]
17:38:17.165842 trace system.CModule
Loading "clientScript" application component
in /var/www/protected/controllers/UsersController.php (458)
in /var/www/index.php (14)[/b][/i]
Does anyone have any idea? I am using the latest version of Yii, PHP 5.3, Apache 2 on Ubuntu 11 and MySQL 5. I also have APC turned on, am doing DB schema caching, etc. The page in question just performs an update on a user record and then reloads the page after the POST - that’s pretty much it.
Any help appreciated!
Thanks,
Boydlee