Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Duplicate Sessions

    I know that this has been covered in detail before. However, I am involved in a busy store ( by which I mean tens of thousands of page views and hundreds of sales a day ). On that store we get about one or two duplicate session errors each day. Obviously, there is no problem with the majority of sessions. The store has been running on the current server for over a year.

    I am just a bit puzzled about why there are this smattering of duplicate sessions being created.

    PHP Version: 5.3.3 (Zend: 2.3.0)

    And

    Cookie Domain True
    Force Cookie Use False
    Check SSL Session ID False
    Check User Agent False
    Check IP Address False
    Prevent Spider Sessions True
    Recreate Session True
    IP to Host Conversion Status true
    Use root path for cookie path False
    Add period prefix to cookie domain False

    Has anybody got any ideas? And if you want any other setting then let me know.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Duplicate Sessions

    Quote Originally Posted by niccol View Post
    I know that this has been covered in detail before. However, I am involved in a busy store ( by which I mean tens of thousands of page views and hundreds of sales a day ). On that store we get about one or two duplicate session errors each day. Obviously, there is no problem with the majority of sessions. The store has been running on the current server for over a year.

    I am just a bit puzzled about why there are this smattering of duplicate sessions being created.

    PHP Version: 5.3.3 (Zend: 2.3.0)

    And

    Cookie Domain True
    Force Cookie Use False
    Check SSL Session ID False
    Check User Agent False
    Check IP Address False
    Prevent Spider Sessions True
    Recreate Session True
    IP to Host Conversion Status true
    Use root path for cookie path False
    Add period prefix to cookie domain False

    Has anybody got any ideas? And if you want any other setting then let me know.
    In includes/configure.php, what is the setting for your cache? Database? Try none... Should go away. Did on mine. Congratulations on the activity of your store.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Duplicate Sessions

    Quote Originally Posted by mc12345678 View Post
    In includes/configure.php, what is the setting for your cache? Database? Try none... Should go away. Did on mine. Congratulations on the activity of your store.
    Setting to 'none' may resolve the problem, but it comes at the cost of reduced performance.

    Just thought I'd mention that.

    Cheers
    RodG

  4. #4
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Duplicate Sessions

    Quote Originally Posted by RodG View Post
    Setting to 'none' may resolve the problem, but it comes at the cost of reduced performance.

    Just thought I'd mention that.

    Cheers
    RodG
    I was thinking the same, "battled" this for more than a year, I finally changed the setting to none, and though I haven't run much of a thorough system response test, it does seem to respond faster now than it did... :/ if you have any other suggestions of how to deal with the "situation" I'm certainly game. (Ie, just ignore the existence of those errors, change something to match some value, etc...) I think at one time I had changed a timing value in the php.ini file and was able to reduce the periodicity of receiving them, but I also don't know at what cost.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,908
    Plugin Contributions
    96

    Default Re: Duplicate Sessions

    Quote Originally Posted by niccol View Post
    ... Has anybody got any ideas? And if you want any other setting then let me know.
    No ideas, but the length of the session ID is controlled by two php.ini values: session.hash_function and session.hash_bits_per_character. Posting those values (and your PHP version, which you did) will help to isolate the issue.

  6. #6
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Duplicate Sessions

    Quote Originally Posted by lat9 View Post
    No ideas, but the length of the session ID is controlled by two php.ini values: session.hash_function and session.hash_bits_per_character. Posting those values (and your PHP version, which you did) will help to isolate the issue.
    Php version: 5.3.13
    Session.hash_function = 0
    Session.hash_bits_per_character = 4
    Anything else need to be provided to help isolate the issue?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,908
    Plugin Contributions
    96

    Default Re: Duplicate Sessions

    I don't know if there are additional settings that would help isolate, but my thinking is that if everyone that has experienced this issue would "chime in" with these settings that a pattern might develop.

  8. #8
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Duplicate Sessions

    I did notice that the bits_per_character was set at the "default" setting as stated in the notes of the php.ini file instead of the recommended value for production and development versions. That meaning the recommended setting for production/development was 5, while the default was 4.

    Also reason I asked about additional information, was if there was any value in knowing the lengthy "code" that is "clashing".
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Duplicate Sessions

    Yes, we do use database caching. I'll try and change that in the next few days and see the result and also try and benchmark the speeds out of interest.

    settings are
    session.hash_bits_per_character 5 5
    session.hash_function 0 0

    Personally, I don't think it can be an issue with php session creation. But that is only a gut feeling. It doesn't happen often enough for that. So, then it makes me think that there is a possibility of a browser issue similar to chrome's tendency in the past to submit data twice. But I can't repeat that on any of the browsers that I test on. But maybe on some older version...

    I haven't seen this on any other store but maybe the volume on this one is showing something that goes unnoticed on others I have worked on.

    :-) wish it was my own store!

  10. #10
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Duplicate Sessions

    Quote Originally Posted by niccol View Post
    Yes, we do use database caching. I'll try and change that in the next few days and see the result and also try and benchmark the speeds out of interest.

    settings are
    session.hash_bits_per_character 5 5
    session.hash_function 0 0

    Personally, I don't think it can be an issue with php session creation. But that is only a gut feeling. It doesn't happen often enough for that. So, then it makes me think that there is a possibility of a browser issue similar to chrome's tendency in the past to submit data twice. But I can't repeat that on any of the browsers that I test on. But maybe on some older version...

    I haven't seen this on any other store but maybe the volume on this one is showing something that goes unnoticed on others I have worked on.

    :-) wish it was my own store!
    Pairs of numbers? Is that what is really present or was something mistyped when entered here?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 7 Mar 2015, 07:56 PM
  2. v153 PHP Fatal error: Duplicate entry for key insert into sessions
    By carlwhat in forum General Questions
    Replies: 2
    Last Post: 6 Jan 2015, 02:32 AM
  3. v151 Duplicate entry for key insert into sessions
    By RCwebdev in forum General Questions
    Replies: 12
    Last Post: 20 Aug 2013, 08:22 AM
  4. v151 Duplicate entry error on sessions table with new install on Mountain Lion Server
    By jeffmic in forum Installing on a Mac Server
    Replies: 4
    Last Post: 26 Mar 2013, 08:37 AM
  5. Duplicate entry in sessions table
    By fibre in forum Bug Reports
    Replies: 0
    Last Post: 11 Oct 2010, 06:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg