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.


Error Messages

Login / Search

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

Community saint

Query Errors, slow page loads

Hopefully these are in the right place.

Code

An error has occurred
Unfortunately a query has failed [DELETE FROM ocp2_member_tracking WHERE mt_time<1146515342 OR (mt_member_id=2 AND mt_type='' AND mt_id='' AND mt_page='start')] [Lost connection to MySQL server during query] (ocPortal version: 2-6.2, PHP version: 4.3.11, URL: /index.php?page=start)
Here is the stack-trace
Below is a stack-trace revealing the state ocPortal was in when the error occured. If this represents a bug in ocPortal's unmodified software, you may want to check ocportal.com for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, the human situation, version numbers, and any other appropriate information.
We apologise for this problem and hope you will work with us so that we can fix it promptly.
File    '/home/content/j/h/u/REMOVED/html/sources/global2.php'
Line    '633'
Function    'get_html_trace'

File    '/home/content/j/h/u/REMOVED/html/sources/database/mysql.php'
Line    '131'
Function    'clean_exit'

File    '/home/content/j/h/u/REMOVED/html/sources/database.php'
Line    '588'
Function    '_db_query'
Args    

File    '/home/content/j/h/u/REMOVED/html/sources/database.php'
Line    '554'
Function    '_query'
Class    'database_driver'
Type    '->'
Args    'Unfortunately a query has failed [DELETE FROM ocp2_member_tracking WHERE mt_time<1146515342 OR (mt_member_id=2 AND mt_type=\'\' AND mt_id=\'\' AND mt_page=\'start\')] [Lost connection to MySQL server during query]'

File    '/home/content/j/h/u/REMOVED/html/sources/support.php'
Line    '1,452'
Function    'query'
Class    'database_driver'
Type    '->'
Args    'DELETE FROM ocp2_member_tracking WHERE mt_time<1146515342 OR (mt_member_id=2 AND mt_type=\'\' AND mt_id=\'\' AND mt_page=\'start\')'
array ( 0 => NULL, 1 => 'rangerops1', )
NULL
NULL
false
false

File    '/home/content/j/h/u/REMOVED/html/sources/site.php'
Line    '297'
Function    'member_tracking_update'

File    '/home/content/j/h/u/REMOVED/html/index.php'
Line    '42'
Function    'do_site'

An error has occurred
A query that had to return something returned nothing: SELECT f_post_count_increment FROM ocp2_f_forums WHERE (id IS NULL) (ocPortal version: 2-6.2, PHP version: 4.3.11, URL: /forum/index.php?page=topics&type=_delete_post&id=39&kfs=0)
Here is the stack-trace
Below is a stack-trace revealing the state ocPortal was in when the error occured. If this represents a bug in ocPortal's unmodified software, you may want to check ocportal.com for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, the human situation, version numbers, and any other appropriate information.
We apologise for this problem and hope you will work with us so that we can fix it promptly.
File    '/home/content/j/h/u/REMOVED/html/sources/global2.php'
Line    '633'
Function    'get_html_trace'

File    '/home/content/j/h/u/REMOVED/html/sources/database.php'
Line    '323'
Function    'clean_exit'

File    '/home/content/j/h/u/REMOVED/html/sources/ocf_posts_action.php'
Line    '576'
Function    'query_value'
Class    'database_driver'
Type    '->'
Args    

File    '/home/content/j/h/u/REMOVED/html/forum/pages/modules/topics.php'
Line    '1,117'
Function    'ocf_delete_posts_topic'
Args    'A query that had to return something returned nothing: SELECT f_post_count_increment FROM ocp2_f_forums WHERE (id IS NULL) '

Function    '_delete_post'
Class    'module_topics'
Type    '->'
Args    'f_forums'
'f_post_count_increment'
array ( 'id' => NULL, )

File    '/home/content/j/h/u/REMOVED/html/forum/pages/modules/topics.php'
Line    '114'
Function    'call_user_func'

File    '/home/content/j/h/u/REMOVED/html/sources/zones.php'
Line    '276'
Function    'run'
Class    'module_topics'
Type    '->'
Args    33
array ( 0 => 39, )
''

File    '/home/content/j/h/u/REMOVED/html/sources/site.php'
Line    '476'
Function    'load_module_page'

File    '/home/content/j/h/u/REMOVED/html/sources/site.php'
Line    '300'
Function    'request_page'
Args    

File    '/home/content/j/h/u/REMOVED/html/forum/index.php'
Line    '42'
Function    'do_site'

Back to the top
 
Posted
Rating:
#18327
Avatar

Hi,

The key phrase in that is 'Lost connection to MySQL server during query'.

I actually get this quite a lot on my windows development machine, after I restart work after not using mySQL for a while.

There's something about your server allowing mySQL to go to sleep and not fully wake up quick enough for PHP to be happy, so to speak. It's not an ocPortal issue.


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:
#18328
Avatar

Community saint

Sweet thanks for the reply.

I was reading that there may be some issues with PHP memory issues. Is this something that would slow the loading for my pages? I didn't understand what you meant by changing the htaccess. Does this help with speeding things up?

Ok that's enough from me for now O_o
Back to the top
 
Posted
Rating:
#18329
Avatar

Some PHP installations define a memory limit to what any page request can take up. ocPortal is a really powerful system, designed to be much more than a simple script; and hence the memory limit PHP has can sometimes be set too low for ocPortal.

If you received the memory limit, you'd know about it… PHP would either give a very clear error message about it, or it would give out blank pages (the blank pages are rather annoying because it's hard to actually determine whether it was caused by running out of memory or not - thankfully it is only the minority of PHP installations which don't give the proper error message).

The .htaccess, on some Apache web server configurations, will allow you to override PHP's memory limit. We supply an example version of that file which we've named 'recommended.htaccess'. That file contains this line:

Code

php_value memory_limit "16M"

Such a line is what you would put in the .htaccess file to set the limit at 16MB. Or of course, you could just rename our recommended.htaccess file to .htaccess.

Some of the PHP installations that have a memory limit have it at 8MB. 16MB is a nice limit in my opinion. However, I don't know of any problems ocPortal has on 8MB unless it's running a site with a lot of data; we will also do any optimisation required to get rid of the problem if people report one to us. We do quote ocPortal as requiring a certain memory limit, but really it's just so people don't think we're making a guarantee that it'll run on 8MB without requiring the occasional optimisation by us.


Last edit: by Philip


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: