Akrion
Well-known member
Ok guys, I really need somebody from XenForo Ltd. to take a look @ this since I am going on and off with inmotion hosting for about 15 emails and more then 2 weeks. Here is their last reply:
"Hello,
Thanks for getting back to us.
At this time the biggest concern we have would be with the delayed inserts. Since all of the example queries forwarded to you by Brandon seem to target a specific table, it may be quite easy to narrow this down further. In fact, after a very rudimentary search for any reference to "xf_thread" on your account, the only results populated were in the audiera.com/forums/ location which seems to contain a xenforo installation.
While the queries aren't actually processing anything until they complete, they do occupy an open connection which may be needed by another user (or yourself) later on and occupy memory and resources on the server. This has a detrimental effect when you're sharing the server with more than a few other users and because of this we do notify you when this seems to be a consistent or problematic issue. Most software developers do not take this into account, and typically shift the blame to avoid performing optimizations to their code or providing alternatives to multi-user environments, sacrificing efficiency and resources for speed. This allows the script to complete running even though it is still processing your request (or waiting to process it) in the background.
See the official MySQL documentation for more information:
http://dev.mysql.com/doc/refman/5.0/en/insert-delayed.html
"Note that INSERT DELAYED is slower than a normal INSERT if the table is not otherwise in use. There is also the additional overhead for the server to handle a separate thread for each table for which there are delayed rows. This means that you should use INSERT DELAYED only when you are really sure that you need it.
The queued rows are held only in memory until they are inserted into the table. This means that if you terminate mysqld forcibly (for example, with kill -9) or if mysqld dies unexpectedly, any queued rows that have not been written to disk are lost."
This aside, by all appearances this should be an easy adjustment you can make if this is an option you can disable (or if they will not allow you to alter this in your settings you may be able to replace the affected portions with some that do not have the same effect). I took the liberty of performing a secondary scan (just in your forum directory) and given the context of the query sent to you found the file that's likely responsible for generating these queries:
.../forums/library/XenForo/Model/Thread.php
You should be able to edit this file (or more specifically the following function within it)
public function logThreadView($threadId)
{
$this->_getDb()->query('
INSERT DELAYED INTO xf_thread_view
(thread_id)
VALUES
(?)
', $threadId);
}
to something like this
public function logThreadView($threadId)
{
$this->_getDb()->query('
INSERT INTO xf_thread_view
(thread_id)
VALUES
(?)
', $threadId);
}
essentially, just removing the "DELAYED" word from it. This will change the way the software is running by sending data, forcing it to send the data as soon as possible, rather than having a background process.
Best Regards,
"
I really appreciate your assistance.
"Hello,
Thanks for getting back to us.
At this time the biggest concern we have would be with the delayed inserts. Since all of the example queries forwarded to you by Brandon seem to target a specific table, it may be quite easy to narrow this down further. In fact, after a very rudimentary search for any reference to "xf_thread" on your account, the only results populated were in the audiera.com/forums/ location which seems to contain a xenforo installation.
While the queries aren't actually processing anything until they complete, they do occupy an open connection which may be needed by another user (or yourself) later on and occupy memory and resources on the server. This has a detrimental effect when you're sharing the server with more than a few other users and because of this we do notify you when this seems to be a consistent or problematic issue. Most software developers do not take this into account, and typically shift the blame to avoid performing optimizations to their code or providing alternatives to multi-user environments, sacrificing efficiency and resources for speed. This allows the script to complete running even though it is still processing your request (or waiting to process it) in the background.
See the official MySQL documentation for more information:
http://dev.mysql.com/doc/refman/5.0/en/insert-delayed.html
"Note that INSERT DELAYED is slower than a normal INSERT if the table is not otherwise in use. There is also the additional overhead for the server to handle a separate thread for each table for which there are delayed rows. This means that you should use INSERT DELAYED only when you are really sure that you need it.
The queued rows are held only in memory until they are inserted into the table. This means that if you terminate mysqld forcibly (for example, with kill -9) or if mysqld dies unexpectedly, any queued rows that have not been written to disk are lost."
This aside, by all appearances this should be an easy adjustment you can make if this is an option you can disable (or if they will not allow you to alter this in your settings you may be able to replace the affected portions with some that do not have the same effect). I took the liberty of performing a secondary scan (just in your forum directory) and given the context of the query sent to you found the file that's likely responsible for generating these queries:
.../forums/library/XenForo/Model/Thread.php
You should be able to edit this file (or more specifically the following function within it)
public function logThreadView($threadId)
{
$this->_getDb()->query('
INSERT DELAYED INTO xf_thread_view
(thread_id)
VALUES
(?)
', $threadId);
}
to something like this
public function logThreadView($threadId)
{
$this->_getDb()->query('
INSERT INTO xf_thread_view
(thread_id)
VALUES
(?)
', $threadId);
}
essentially, just removing the "DELAYED" word from it. This will change the way the software is running by sending data, forcing it to send the data as soon as possible, rather than having a background process.
Best Regards,
"
I really appreciate your assistance.