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.

Locked Inserts

July 17, 2012 3:42pm

Subscribe [1]
  • #1 / Jul 17, 2012 3:42pm

    VitaminIsGood

    11 posts

    We recently had some issues where a bunch of EE inserts got locked up and caused our server to fail. When looking into the error logs, I found that all of the locked queries were trying to insert into the ‘ee_security_hashes’ table. I am just curious what that table is used for and if any one has any ideas as to why they were getting locked up. The site was experiencing a slight influx in views, but it has handled more in the past without any problems.

  • #2 / Jul 18, 2012 3:21pm

    Kevin Smith

    4784 posts

    Hi VitaminIsGood,

    If EE’s sessions are set to use session IDs, they’re added to that table for EE to keep track of them. Most sessions don’t, since user sessions (front-end logins) only require cookies by default. The backend (CP logins) requires both cookies and session IDs. How do you have your system set up?

    Realistically, if you have a site where there are that many simultaneous logged-in users where their sessions require session IDs, you might need to work with your host to make sure your database server is equipped to handle that much traffic.

    Has your traffic grown considerably as of late?

  • #3 / Jul 18, 2012 4:02pm

    VitaminIsGood

    11 posts

    Thanks for replying. Traffic has not grown considerably. The site averages around 1,500 daily visitors and is not the type of site where lots of people are logging in constantly. At most 2 admins would be simultaneously logged in to manage the site content.

    In the SQL error logs I noticed the same IP had multiple inserts that were locked up. There were even a few IPs in the list that are not from our region. Could this have been caused by a user attempting to login rapidly? Is there anything I can do in my code to limit the amount of these session ID’s?

  • #4 / Jul 19, 2012 12:45pm

    Kevin Smith

    4784 posts

    Just to be clear, are your session preferences still the default? (Front-end is cookies only, CP is cookies + session ID.)

    It certainly could be from an unauthorized user trying to access the CP. Do any of the errors from the SQL log show an IP from anyone authorized to access the CP? Or are the errors always from unknown IPs? How far apart are the login attempts that are causing your DB to lockup?

    What kind of hosting platform are you on? Shared? VPS? Dedicated?

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

ExpressionEngine News!

#eecms, #events, #releases