ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

a question on banning an IP address from receiving comment notifications

January 09, 2012 3:19pm

Subscribe [2]
  • #1 / Jan 09, 2012 3:19pm

    bthom62

    164 posts

     

  • #2 / Jan 10, 2012 5:04pm

    Dan Decker

    7338 posts

    Hi bthom62,

    I’m not sure what happened here, but your post contains no content. Can you post back with the issue you are having? I’d be happy to help in any way I can.

    Cheers!

  • #3 / Jan 10, 2012 5:32pm

    bthom62

    164 posts

    It is alright

    This string can be closed, for I figured out a way of stopping people getting comment notifications.

    Also another question though….

    Is there any harm with me going into the database and erasing old comments?

  • #4 / Jan 12, 2012 8:59pm

    Sean C. Smith

    3818 posts

    Glad you got that solved.

    There is no need to go through the database to delete comments (I also wouldn’t recommend it). You can easily delete comments via the edit page - find the entry with the comment you want to delete and then click on the “view” link under comments and from there you can delete them.

    Sean.

  • #5 / Jan 12, 2012 9:20pm

    bthom62

    164 posts

    what is wrong with deleting them from the database

    we have 70,000 comments and I want to wipe about 60,000 out

  • #6 / Jan 17, 2012 8:50pm

    Robin Sowell

    13255 posts

    It’s not recommended because when you delete a comment via the control panel?  More happens than just removing the record from exp_comments.  Mostly those are stats changes - there’s a record of comments for an entry in channel_titles and for a given channel in exp_channels and then a record of how many comments a member has in exp_members.  I believe syncing might fix the channel comment count, though I won’t swear.  But it won’t fix everything (which could be pretty resource intensive).

    So yes- dropping them from the comments table is going to leave you with some messed up statistics.  If it needs to happen and the CP is just out (which with 60,000 to drop… yea, I wouldn’t want to do it either), I’d likely write some php to handle clearing out the stats properly as well.  You can take a look at the
    update_stats method in mcp.comments.php to get the gist of what needs to happen.  And of course you would want to be sure you have a good backup database before trying anything manual.  But that’s likely the way I’d go.

  • #7 / Jan 17, 2012 8:59pm

    bthom62

    164 posts

    thank you, but darn this was a little late…

    I have deleted the enteries from the database, Though I have a back up of the the entire database a few days before.

    Can I enter them back in from the back up?

    I am not looking to expression engine for any stats, and this now opens up my other occassional issue with expression engine

    I do not want expression engine to collect stats.

    Every few days or so around 4-5 in the morning (Eastern Standard Time) the site becomes unreachable, because something is taking up all the CPU processing on the site.

    It is too regular for it to be random, So I am thing search bots or stat gathering and compiling.

    That is why I want the stats turned off on expression engine (I do not think I even look at them.

  • #8 / Jan 17, 2012 9:24pm

    Robin Sowell

    13255 posts

    Sorry about that, bthom62!  Hrm- well, you’d want to make a copy of the current database and then try to add back in the deleted comments.  The comment_id is auto generated, but it’s highly likely any new comments will start with an id after the highest deleted id.  But still- likely need php to pull them back in.  It’s doable, but if you’ve had any new comments come in, it’s more complicated than simply rolling back the exp_comments table.  (If no new comments- then yes, it is exactly that simple, as long as all you did was delete the comments from that table).

    As to the 5am blip, it shouldn’t be EE related if it’s consistent- that would only happen if something is being run date based (and triggered by a page load).  Well- if you had a moblog check set for every 24 hours, it’s possible it could be that.  Or if you were running something via the chron plugin.  But nothing you didn’t set up to do so.  There is some periodic pruning of things that goes on automatically, but that’s either triggered randomly or when a certain size is reached.

    Any chance a server admin could set things up to see what’s triggering the overload?

  • #9 / Jan 17, 2012 9:44pm

    bthom62

    164 posts

    our traffic is lightest at this time, and to the best of my knowledge no chron jobs, and no idea what a moblog check is.

    We can let the comments go though, they only potentially open you up to trouble.

    this is what engine hosting said the last time this happened


    Brian,

    We see a spike in your CPU and memory usage at around 4:20 for brief period this morning on your database server. We don’t see that on your database server yesterday and randomly see that on and off for a few days back.You are on a mini-VPS setup so we do not do mysqldump backups of your database server. Its a VMware data recovery snapshot that runs between 6pm and midnight each night so would not be involved with this at all. More likely than not its a bot/spider hitting certain sections of your web site that Google Analytics is not going to see. Your web servers, like yesterday, never break about 10-15% cpu usage for the 24 hr period.  Your database server averages 40% CPU usage with a lot of spikes into the 60-90+% range CPU usage wise
    ExpressionEngine sites are generally heavier on the web servers, lighter on the database servers. So yes there was a CPU usage spike this morning in the time frame you mentions on your database server. This likely caused you to have site issues for a brief period, but as we know it was a spike in server resource usage, the servers did not have “problems” and its something on your site generating the usage.

    We can provide server resource increases, at higher plan levels, but you probably should have a web developer that knows ExpressionEngine review your raw apache logs for the time frame in question, compare the pages/templates used by likely spiders/bots in that time frame and make sure the best practices for conditionals, resource intensive add-ons, disabling weblog tag parameters not in use, etc.

    Please let me now if there is anything else I can help you with.
    Holly

  • #10 / Jan 23, 2012 8:28pm

    Sean C. Smith

    3818 posts

    Hi bthom62,

    I’m going to ping Robin once again to bring her back into this thread so she can look at your post.

    Sean

  • #11 / Jan 23, 2012 8:42pm

    bthom62

    164 posts

    Thank you

  • #12 / Jan 25, 2012 3:30pm

    Robin Sowell

    13255 posts

    bthom62, going over server logs is really a job for a server administrator and not something we’re going to be best able to help you with. 

    If you have identified a particular page/template that’s causing an excessive load, you could paste the template contents and the contents of the template debugging and output profiler and we could likely make suggestions on how you might optimize things.  But we’d really need to know where it’s bogging down first. 

    If it is a bot gone wild, you might consider enabling throttling to limit the number of page loads in a given time frame.  But that is a broad approach if you have a particular page that’s causing the problem and that could be better optimized.  For identifying the main cause of the slowdown, contacting someone in the ProNet with server/optimization experience is likely your best choice.

  • #13 / Jan 25, 2012 9:11pm

    bthom62

    164 posts

    Hosting says to go to the forums…

    The problem, I doubt is a template.

    We are a news site get over 1,000,000 a month.

    The blocked processes, database problems, usually happen at 400 in the morning, when I have no traffic. 

    If it was a template, would it not happen at peak traffic, I tried making my pages no follow, but it ruined my google revenue, and my site still hung.

    Thank you

  • #14 / Jan 26, 2012 11:18am

    Robin Sowell

    13255 posts

    Yep- for SEO, no follow is not really what you want to do.  If you look at your tracking logs- do you see robots hitting the site at the time of the slowdown?

    There really is nothing in EE proper that is going to trigger activity at a certain time.  The cron add-on could do it (if triggered by a page load), but a stock install just doesn’t do anything at a certain time of day.

  • #15 / Jan 26, 2012 12:11pm

    bthom62

    164 posts

    Thank you

    where will I find tracking logs?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases