HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


MySQL connection limit when searching a catalogue

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#73389 (In Topic #15353)
Avatar

Well-settled

version 7.1.3

We've got a limit to simultaneous MySQL connections to 20 for our site and this limit is constantly used up when performing a boolean search on catalogue fields and trying to open any other page in the same time.
The search request:

Code

SELECT r.*,r.id AS id,r.cc_id AS r_cc_id FROM ocp4_catalogue_fields f LEFT JOIN ocp4_catalogue_entries r ON (r.c_name=f.c_name) JOIN ocp4_catalogue_efv_short c ON (r.id=c.ce_id AND f.id=c.cf_id) JOIN ocp4_seo_meta m ON (m.meta_for_type='catalogue_entry' AND m.meta_for_id=r.id) JOIN ocp4_translate tm ON tm.id=m.meta_keywords AND tm.language='EN' WHERE MATCH (tm.text_original) AGAINST ('holy fire') GROUP BY r.id
locks several tables and other requests are locked and do not run accumulating up to the connections limit then blocking the site. So there are two possible ways to go:
1. Is is possible to stop locking MyISAM tables during this request?
2. Is it possible to ocPortal to work with InnoDB tables? I'd transform all ocPortal tables (or probably you can advise me with the ones which should do so) to InnoDB that allows to run several requests without locking tables if it is possible to ocPortal to work with this tables type.

Or possibly you can advise me other solution that would work :) Thanks in advance.
Back to the top
 
Posted
Rating:
#73391
Avatar

MySQL's biggest problem.

MyISAM is big on locking.

InnoDB cannot do fulltext search.

If you've reached this from upgrading a pre-6 release, see our DB index creation script at bottom of:
http://ocportal.com/site/news/view/new-releases/ocportal-6-released_2.htm
It will help with performance, and is the result of a lot of testing.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73392
Avatar

Well-settled

Thanks Chris, I've done new indices you have advised, will see if it helps.

Btw, didn't you think to implement Sphinx for full-text search? It would allow to use InnoDB for everything and fasten searches dramatically.
Back to the top
 
Posted
Rating:
#73393
Avatar

We would certainly consider it if we had a client project that would cover the cost, unfortunately there hasn't been one yet. Something like this is unlikely to run on shared hosting which is the majority of users.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: