This time I REALLY think I have things back to normal. Let me know if they aren’t.
If any of you get an error message at the top of the screen, please post it in here (or email to me)
This time I REALLY think I have things back to normal. Let me know if they aren’t.
If any of you get an error message at the top of the screen, please post it in here (or email to me)
You must be logged in to post a comment.
WordPress database error: [The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay]
SELECT ID, post_date, lastvisit, is_done, comment_count, post_title, count(ID) as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 24) as filterTable ON ID = postid LEFT OUTER JOIN (select comment_date, comment_post_ID from wp_comments WHERE wp_comments.comment_date > '2012-08-10 14:22:23' AND user_id <> 24) as filterTableTwo ON filterTableTwo.comment_post_ID = wp_posts.ID WHERE post_type = 'post' and post_status = 'publish' and (is_done IS NULL OR is_done = 0) AND filterTableTwo.comment_date > COALESCE(lastvisit,'2012-08-10 14:22:23') GROUP BY IDUNIONSELECT DISTINCT ID, post_date, lastvisit, is_done, comment_count, post_title, 0 as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 24) as filterTable ON ID = postid WHERE lastvisit IS NULL and post_date > '2012-08-10 14:22:23' AND post_type = 'post' and post_status = 'publish'
WordPress database error: [The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay]
SELECT ID, post_date, lastvisit, is_done, comment_count, post_title, count(ID) as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 17) as filterTable ON ID = postid LEFT OUTER JOIN (select comment_date, comment_post_ID from wp_comments WHERE wp_comments.comment_date > ‘2012-06-13 13:41:27’ AND user_id <> 17) as filterTableTwo ON filterTableTwo.comment_post_ID = wp_posts.ID WHERE post_type = ‘post’ and post_status = ‘publish’ and (is_done IS NULL OR is_done = 0) AND filterTableTwo.comment_date > COALESCE(lastvisit,’2012-06-13 13:41:27′) GROUP BY ID
WordPress database error: [The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay]
SELECT ID, post_date, lastvisit, is_done, comment_count, post_title, count(ID) as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 17) as filterTable ON ID = postid LEFT OUTER JOIN (select comment_date, comment_post_ID from wp_comments WHERE wp_comments.comment_date > ‘2012-06-13 13:41:27’ AND user_id <> 17) as filterTableTwo ON filterTableTwo.comment_post_ID = wp_posts.ID WHERE post_type = ‘post’ and post_status = ‘publish’ and (is_done IS NULL OR is_done = 0) AND filterTableTwo.comment_date > COALESCE(lastvisit,’2012-06-13 13:41:27′) GROUP BY ID UNION SELECT DISTINCT ID, post_date, lastvisit, is_done, comment_count, post_title, 0 as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 17) as filterTable ON ID = postid WHERE lastvisit IS NULL and post_date > ‘2012-06-13 13:41:27’ AND post_type = ‘post’ and post_status = ‘publish’and comment_count=0
Can you guys try again? I think I’ve finally got it.
Still getting
WordPress database error: [The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay]
SELECT ID, post_date, lastvisit, is_done, comment_count, post_title, count(ID) as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 17) as filterTable ON ID = postid LEFT OUTER JOIN (select comment_date, comment_post_ID from wp_comments WHERE wp_comments.comment_date > ‘2012-06-13 13:41:27’ AND user_id <> 17) as filterTableTwo ON filterTableTwo.comment_post_ID = wp_posts.ID AND filterTableTwo.comment_date > COALESCE(lastvisit,’2012-06-13 13:41:27′) WHERE post_type = ‘post’ and post_status = ‘publish’ and (is_done IS NULL OR is_done = 0) AND filterTableTwo.comment_date > COALESCE(lastvisit,’2012-06-13 13:41:27′) GROUP BY ID UNION SELECT DISTINCT ID, post_date, lastvisit, is_done, comment_count, post_title, 0 as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 17) as filterTable ON ID = postid WHERE lastvisit IS NULL and post_date > ‘2012-06-13 13:41:27’ AND post_type = ‘post’ and post_status = ‘publish’and comment_count=0
SHIT
Temporary fix: I just allowed the big select.
If anyone knows anyone with more MySQL talent than I have, I’d love to talk about why this select is so big.
I tried calling but didn’t get an answer.
Thanks, and go As.
K, unread comments seem to be working inside threads again, but not on the FK main page just like yesterday.
Thanks, and go As.
But no SQL error reported?
Nope, no errors whatsoever.
Thanks, and go As.
And when you say not working, you mean you’re just getting “…loading…”? Or it is misreporting results?
Just getting …loading…
Thanks, and go As.
That is so strange. There shouldn’t be any difference whatsoever between the front page and interior pages.
Everything is working properly for me again, but very slowly.
Same here, full functionality, kinda slow. Both Mac OSX with Firefox and Windows 7 with IE.
One temporary fix on your side would be to “mark all read” at some point.
I wonder if the ozzs and FSUs ever log out of FK, delete their FK cookie, clear their browser history, and log back in and start over. I’m a habitual log-outer and browser clearer and I’m not seeing the issues they’re having.
I was having all the issues last night and I do log out, etc on at least a somewhat regular basis. But, not that you say it, I realize I never bothered trying that last night.
I logged out and cleared my browser history, but I didn’t delete cookies.
I don’t think that’s it. The slowness is because I’ve gotten us down to the one query, but that query is inefficient. I’m seeking help from devshed, but we’ll have to see how it goes.
One way I filter the results is based upon the last time all are marked unread, so it should partially de-shit-ify the current query. It wouldn’t matter much to the ideal query I’m assuming exists.
Cookies and browser history are client-side and this is all server-side code.
Does getting to the end of unread comments by actually reading them have the same effect as marking them all as read?
Based on nm’s comments above, I don’t think so. It seems there is a separate variable for each user keeping track of the last date they marked all as read. One horrible hack would be to update that value whenever the regular query shows no unread posts or comments.
Correct.
And that’s true, I could do that. It’s actually a pretty good idea.
This is implemented now. I’m going to keep an eye on the table, but it’s not really a horrible hack, and I can use it at the same time to delete some unreadcomments rows. Which should significantly reduce that table (though make things slow as people transition into it. Especially the first load for FKers who never marked all read.
Appears like unread comments are showing up on the main page now.
Thanks, and go As.
I’m getting database connection errors.
Errors galore. And the unread deal is going whackadoodle and pulling a lot of crap as unread.
WordPress database error: [Can’t find file: ‘./freekrau_fkdb/wp_unreadcomments.frm’ (errno: 13)]
SELECT ID, post_date, lastvisit, is_done, comment_count, post_title, count(ID) as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 31) as filterTable ON ID = postid LEFT OUTER JOIN (select comment_date, comment_post_ID from wp_comments WHERE wp_comments.comment_date > ‘2009-05-13 05:59:28’ AND user_id <> 31) as filterTableTwo ON filterTableTwo.comment_post_ID = wp_posts.ID AND filterTableTwo.comment_date > COALESCE(lastvisit,’2009-05-13 05:59:28′) WHERE post_type = ‘post’ and post_status = ‘publish’ and (is_done IS NULL OR is_done = 0) AND filterTableTwo.comment_date > COALESCE(lastvisit,’2009-05-13 05:59:28′) GROUP BY ID UNION SELECT DISTINCT ID, post_date, lastvisit, is_done, comment_count, post_title, 0 as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 31) as filterTable ON ID = postid WHERE lastvisit IS NULL and post_date > ‘2009-05-13 05:59:28’ AND post_type = ‘post’ and post_status = ‘publish’and comment_count=0
insert into wp_unreadcomments (userid, postid, lastvisit) values (31, -1, ‘2012-09-19 16:14:01’) on duplicate key update lastvisit = ‘2012-09-19 16:14:01’
DELETE FROM wp_unreadcomments WHERE userid = 31 AND lastvisit < '2012-09-19 16:14:01' There are no unread comments, only unwritten ones insert into wp_unreadcomments (userid, postid, lastvisit) values (31, 2254, '2012-09-19 16:14:01') on duplicate key update lastvisit = '2012-09-19 16:14:01'
WordPress database error: [Lost connection to MySQL server during query]
SET SQL_BIG_SELECTS=1;
WordPress database error: [MySQL server has gone away]
SELECT ID, post_date, lastvisit, is_done, comment_count, post_title, count(ID) as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 15) as filterTable ON ID = postid LEFT OUTER JOIN (select comment_date, comment_post_ID from wp_comments WHERE wp_comments.comment_date > ‘2009-05-13 01:31:52’ AND user_id <> 15) as filterTableTwo ON filterTableTwo.comment_post_ID = wp_posts.ID AND filterTableTwo.comment_date > COALESCE(lastvisit,’2009-05-13 01:31:52′) WHERE post_type = ‘post’ and post_status = ‘publish’ and (is_done IS NULL OR is_done = 0) AND filterTableTwo.comment_date > COALESCE(lastvisit,’2009-05-13 01:31:52′) GROUP BY IDUNIONSELECT DISTINCT ID, post_date, lastvisit, is_done, comment_count, post_title, 0 as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 15) as filterTable ON ID = postid WHERE lastvisit IS NULL and post_date > ‘2009-05-13 01:31:52’ AND post_type = ‘post’ and post_status = ‘publish’and comment_count=0
WordPress database error: [MySQL server has gone away]
SET SQL_BIG_SELECTS=0;
[Can’t find file: ‘./freekrau_fkdb/wp_unreadcomments.frm’ (errno: 13)]
SELECT ID, post_date, lastvisit, is_done, comment_count, post_title, count(ID) as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 15) as filterTable ON ID = postid LEFT OUTER JOIN (select comment_date, comment_post_ID from wp_comments WHERE wp_comments.comment_date > ‘2009-05-13 01:31:52’ AND user_id <> 15) as filterTableTwo ON filterTableTwo.comment_post_ID = wp_posts.ID AND filterTableTwo.comment_date > COALESCE(lastvisit,’2009-05-13 01:31:52′) WHERE post_type = ‘post’ and post_status = ‘publish’ and (is_done IS NULL OR is_done = 0) AND filterTableTwo.comment_date > COALESCE(lastvisit,’2009-05-13 01:31:52′) GROUP BY ID UNION SELECT DISTINCT ID, post_date, lastvisit, is_done, comment_count, post_title, 0 as newcomments from wp_posts LEFT OUTER JOIN (select * from wp_unreadcomments WHERE userid = 15) as filterTable ON ID = postid WHERE lastvisit IS NULL and post_date > ‘2009-05-13 01:31:52’ AND post_type = ‘post’ and post_status = ‘publish’and comment_count=0
insert into wp_unreadcomments (userid, postid, lastvisit) values (15, -1, ‘2012-09-19 16:13:32’) on duplicate key update lastvisit = ‘2012-09-19 16:13:32’
DELETE FROM wp_unreadcomments WHERE userid = 15 AND lastvisit < '2012-09-19 16:13:32' • There are no unread comments, only unwritten ones insert into wp_unreadcomments (userid, postid, lastvisit) values (15, 2254, '2012-09-19 16:13:32') on duplicate key update lastvisit = '2012-09-19 16:13:32' I can't see comments in the threads, just in the dashboard.
You just *HAAAAAD* to one up me, didn’t you.
Yes. It’s my job to keep you in check.
Thanks! These were helpful.
The lesson, as always: I’m an idiot, and you can’t do performance testing on a sandbox system only you use.
Just to close the loop: All my fault. I effect up the database interaction and let loose the mother of all queries. Which asploded the site’s functionality.
It should be back now, minus the unread comment tracking data.
Thanks. I would have been on a nonstop bender for the last three days.
Got this one a couple of minutes ago… probably nothing, tho
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://freekraut.net/?
The following error was encountered:
Connection to 31.22.4.74 Failed
The system returned:
(111) Connection refused
The remote host or network may be down. Please try the request again.
Your cache administrator is webmaster.
Generated Thu, 20 Sep 2012 17:18:03 GMT by sv21.byethost21.org (squid/2.7.STABLE9)
Odd.
Probably just a little server hiccup.
Ok. Major upgrade to the unread comment code just went live, so as always let me know if you have any problem. Unread comments query should now touch hundreds of database rows instead of millions, but we will have keep an eye on the code to make sure it is accurate.
I ran into something just now where the widget just showed “loading” but when I clicked into a thread it said I had to be logged in to comment. I logged in and the widget seems to be showing the unread comments now, but when I opened this thread the Z-browsing didn’t register.
Hmm. Sounds like something got crossed up where it both marked the comment as read and told you you weren’t logged in.
Not encouraging, but hopefully not something that is happening to other people.
I’m in Firefox, by the way. This also took a while to load the page and I’m still not getting the Z-function working in here.
Also, trying to submit this comment timed out on me after over a minute with the following error the first time:
The website you are trying to access is currently unavailable. Please try again at a later time.
Click the button below to browse the site from cache. (Cookies and Javascript must be enabled.)
Also just went into the Events from 10/2 post and the Z-function is not working for me there either. I stayed logged in.
i got kicked off mid writing a comment earlier, round 11am. i hit post and it said i had to log back in.
Yeah. I changed to (and back from) http://www.frekraut.com. That effed up your cookies.
[spits out cookies.]
those aren’t chocolate chips, are they?
Found the bug in the upgrade code and just rolled it out. Hopefully this time it will be faster, more stable, AND functional.
FreeSiteUpgrade
In fairness to me (and for the MySQL curious) the issue is that MySQL doesn’t handle derived tables well AT ALL. Instead it discards their indexes, and makes you look at the whole damn thing every time.
If, however, you create a view…
I just want to make sure that the mySQL curious didn’t let their curiosity break FK.
Nope. Not at all. The problem is that a working query just wasn’t fast enough, and I haven’t yet figured out how to pare the whole thing down.
Josh (emperor) tells me he’s having trouble logging in because the e-mail feature to send a password reset is suspended. Nevermoor, he’d like to know if you can send him a new one.
Sent. Thanks.
Cool. And the Z thing worked for me this time.
Great!
Missed opportunity: you could have told him he had to email you first.
He knows what he did.
This is true.
Best regards, and go A’s!
heh.
YOU ARE BANNED FROM FREE KRAUT.
You can browse the blog, but you can’t participate.
We should have showed up to the A’s blog day with signs and anytime tonces tried to go anywhere or do anything jumped up with a sign that said
YOU ARE BANNED FROM REAL LIFE
You can browse, but you can’t participate.
Heh.
That would have been awesome.
If I were invited, I would definitely refuse to speak to him well past the point of awkwardness.
Of course, first we’d probably have to let Google index us.
I can’t promise I wouldn’t have had some harsh words for him if I went.
That or I’d have just pretended he didn’t even exist.
I’ve gone for the latter whenever I’ve accidentally ended up in the same vicinity of him.
Since ending up in Coliseum Jail is probably bad.
Is that different from real life jail?
You have to pay for your own soft drinks.
Fascists!!!!
But you’d have to sit and stand right next to him. Very closely. Revving up the awkwardness that you’re not even acknowledging his existence.
Nope. Just act as if he isn’t there.