Posted by heretic381 on January 19, 2013 at 11:33pm
4 followers
Jump to:
| Project: | Chaos tool suite (ctools) |
| Version: | 7.x-1.2 |
| Component: | Exportables |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hi,
I had to check my site queries, due to a weak performance od page loading.
I found at least two very slow queries, both coming from ctools.
ctools_export:views_view
ctools_export:metatag_config
I've disabled Meta tags module, but I can't remove Views, as my site is relying on it.
lock_acquire, lock_release from ctools_export are blocking page loading up to several seconds.
Any ideas of what's going on?
Thanks.
Comments
#1
Can you tell me exactly what queries you're referring to?
#2
lock_acquire
P A
INSERT INTO drp7_semaphore (name, value, expire) VALUES ('ctools_export:views_view', '...', '...')
lock_release
P A
DELETE FROM drp7_semaphore WHERE (name = 'ctools_export:views_view') AND (value = '...')
Maybe it is related to locale module, because sometimes there's a bunch of locale queries between these two queries. But not always.
#3
That's really odd. Those queries really should be fast. Perhaps there is something wrong with your semaphore table that's slowing things down (does it need a repair? Check your mysql logs).
That table and that function is completely controlled by core itself, and it's just a call into Drupal's pluggable lock system that leads to them. I'm not sure that a module can do anything about those; the locking is necessary to prevent race conditions, so whatever is causing the problem on your system needs to be fixed.
Hopefully it's "just" a problem in your database and can be fixed with a repair tables or something. Perhaps something has left a bunch of stale locks in that table and it hasn't been properly cleaned up? IF that table is flooded with data, that might cause a problem too.
#4
I think that this issue is somehow related to the locale module. When choosing another language than English in language menu, as I said, there's some locale stuff between the lock and release queries. But, queries are even slower on default, English pages.
#5
I've tried some tweaks in mysql. Without success.
semaphore table cannot be optimized. I've tried to defragment it, but no results of any kind.
Could you advise me how to find out what's going on?
Should I post an issue for a drupal core?
#6
i have the same problem:
# Query_time: 2.416221 Lock_time: 0.000015 Rows_sent: 0 Rows_examined: 0use crp_moda2;
SET timestamp=1363029980;
INSERT INTO semaphore (name, value, expire) VALUES ('ctools_export:views_view', '1581309014513e2fd9da6fe8.29868910', '1363030007.8947');
# Query_time: 2.696798 Lock_time: 0.000022 Rows_sent: 0 Rows_examined: 0
SET timestamp=1363029980;
INSERT INTO semaphore (name, value, expire) VALUES ('ctools_export:views_view', '1391782654513e2fd9960611.83102064', '1363030007.6144');
and my semaphore table only have 6 entries.
How do i clean up the table?
#7
If you have this issue, what type of cache are you using?
We are currently testing with file_cache, and it seems that the (remote) disk where that cache resides just can not keep up with the cache requests from views.
The semaphore locking kicks in, when views can not find the view you are looking for in the cache. That might be your problem, not the locking itself.
You can see where this happens in this function.
#8
Hi there.
From what I recently experienced, this is not a module, or even drupal issue. The first thing to check is your database. Myisam or Innodb tables?
If Innodb, then you have to add some lines in your mysql settings specifically for innodb tables. This is really going to speed up all queries. Including the semphore from ctools_export.
It wont solve all problems though. This is only the first step in tweaking servers applications as they are the ground for your drupal site.
Unfortunatelly, this basic, but very important setting, is not mentionned anywhere on drupal site.