Tuesday, 20 March 2012

Keeping PHP Sessions on Memcached

This happens to be one of the areas where the production/stage setup is different from our local setups. On prod/stage, PHP sessions are stored in memcached. What that does is that it makes it impossible to store medium - large chunks of data in the session. Doing that is anyhow not advisable.
When an attempt is made to write a large piece of data to the session, it results in a write failure from php to memcached. Subsequently, a read failure from memcached immediately follows.
In cases where session information is needed, this results in irregular behavior. In our case, it resulted in content console users being logged out. The failure can be different in different cases but the pattern will be the same.

Check: PHP error logs, SELinux context (if SELinux is enabled) etc.
Clues: Failures occur more irregularly when there is a write failure as discussed. The failures are more regular with SELinux issues.

The fix for the SELinux issue is simple. Just check:
# getsebool httpd_can_network_memcache

That should output:
httpd_can_network_memcache --> on

If it outputs an off, just do:
# setsebool -P httpd_can_network_memcache 1

As simple as that.

89 comments:

  1. PHP or Hypertext Preprocessor is the most preferred programming language in the world, used for dynamic website development and web based applications. This server side scripting language has been used to develop some of the most popular website such as Facebook and Wikipedia.
    php

    ReplyDelete
  2. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    Php course in chennai

    ReplyDelete
  3. Those guidelines additionally worked to become a good way to
    recognize that other people online have the identical fervor like mine
    to grasp great deal more around

    white label website builder

    ReplyDelete
  4. But it tracks every visitor to that page so now you can see the number of views your page is getting. Not just the number of clicks the link gets. And all from one central secure dashboard sitting on your server. Quality Backlinks Niche

    ReplyDelete
  5. Nice post By reading your blog, i get inspired and this provides some useful information. Thank you for posting this exclusive post for our vision.
    Web Design Training

    ReplyDelete
  6. I am thankful for this blog to gave me much knowledge regarding my area of work. I also want to make some addition on this platform which must be in knowledge of people who really in need. Thanks.
    white label website builder

    ReplyDelete
  7. Thanks for posting useful information.You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...Really it was an awesome article...very interesting to read..please sharing like this information......
    PHP interview questions

    ReplyDelete
  8. thanks for sharing this article to us , it is very nice article and good post thanks for sharing this article to us
    i really like this article because i got good info about this article thanks for haring this article to us .best regards.
    mainframe training in hyderabad

    ReplyDelete
  9. Thanks for taking time to share this wonderful article with us. I'm looking forward to learn more from your blogs. Keep us updated.

    WordPress Training in Chennai

    ReplyDelete
  10. Baca berikut ini contoh mantra judi kartu yang terkadang digunakan bettor! Anda bisa coba lebih dulu atau tanyalah pada siapa saja yang memang sempat menggunakan cara tersebut sampai mereka sukses dan sukses dengan mantra itu.
    asikqq
    dewaqq
    sumoqq
    interqq
    pionpoker
    bandar ceme terpercaya
    hobiqq
    paito warna
    forum prediksi

    ReplyDelete
  11. Awesome post. I am a normal visitor of your blog and appreciate you taking the time to maintain the excellent site. I’ll be a frequent visitor for a long time.

    ACP Sheet
    ACP Sheet Price
    Aluminium Composite Panel
    ACP Panel
    ACP Sheets

    ReplyDelete
  12. smart outsourcing solutions is the best outsourcing training
    in Dhaka, if you start outsourcing please
    visit us: Freelancing training in bangladesh
    Outsourcing training in dhaka
    Outsourcing training in bangladesh

    ReplyDelete
  13. Such A nice post... thanks For Sharing !!Great information for new guy like Happy New year 2020

    ReplyDelete
  14. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    JavaScript Training in Chennai

    JavaScript Training in Chennai

    ReplyDelete
  15. Such A nice post... thanks For Sharing !!Great information for new guy like showbox for android

    ReplyDelete
  16. Such A nice post... thanks For Sharing !!Great information for new guy like antimalware service executable

    ReplyDelete
  17. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

    ReplyDelete
  18. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

    ReplyDelete
  19. thanks for the post were very helpful.have a great start and better future...
    qr code generator

    ReplyDelete
  20. keep up the good work. this is an Assam post. this to helpful, i have reading here all post. i am impressed. thank you. this is our digital marketing training center. This is an online certificate course
    digital marketing training in bangalore / https://www.excelr.com/digital-marketing-training-in-bangalore

    ReplyDelete
  21. Thank you for the information and updates. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts.
    Selenium courses in Pune

    ReplyDelete
  22. Here is the details of BMIT (Medical Imaging Technology) colleges in Bangalore. If you are looking to study BMIT in Bangalore, the below will help you to find the best BMIT colleges in Bangalore.

    BSc Medical Imaging Technology Colleges in Bangalore | Medical Imaging Technology Colleges in Bangalore |

    ReplyDelete
  23. Here is the details of B.Sc Optometry colleges in Bangalore. If you are looking to study BSc Optometry in Bangalore, the below will help you to find the best Optometry colleges in Bangalore.
    BSc Optometry Colleges in Bangalore | Optometry Colleges in Bangalore |

    ReplyDelete
  24. Here is the details of B.Sc Renal Dialysis Technology colleges in Bangalore. If you are looking to study BSc Renal Dialysis Technology in Bangalore, the below will help you to find the best Renal Dialysis Technology colleges in Bangalore.
    BSc Renal Dialysis Colleges in Bangalore | Renal Dialysis Technology Colleges in Bangalore |

    ReplyDelete
  25. Here is the details of B.Sc Respiratory Care Technology colleges in Bangalore. If you are looking to study BSc Respiratory Care Technology in Bangalore, the below will help you to find the best Respiratory Technology colleges in Bangalore.
    BSc Respiratory Care Technology Colleges in Bangalore | Respiratory Care Colleges in Bangalore |

    ReplyDelete
  26. Here is the details of B.Sc Cardiac Care Technology colleges in Bangalore. If you are looking to study BSc Cardiac Care Technology in Bangalore, the below will help you to find the best Cardiac Care Technology colleges in Bangalore.
    BSc Cardiac Care Technology Colleges in Bangalore | Cardiac Care Colleges in Bangalore |

    ReplyDelete
  27. Here is the details of B.Sc Perfusion Technology colleges in Bangalore. If you are looking to study BSc Perfusion Technology in Bangalore, the below will help you to find the best Perfusion Technology colleges in Bangalore.
    BSc Perfusion Technology Colleges in Bangalore | Perfusion Technology Colleges in Bangalore |

    ReplyDelete
  28. Great post!!! Thanks for sharing this wonderful blog with us...
    Software Testing Course in Bangalore

    ReplyDelete
  29. Iinstazood is a best Instagram bot than Instazood, get free Instagram followers, Real instagram followers, Instagram auto likes, auto Instagram comments, publish instagram posts.

    ReplyDelete
  30. Hello Admin!

    Thanks for the post. It was very interesting and meaningful. I really appreciate it! Keep updating stuffs like this. If you are looking for the Advertising Agency in Chennai | Printing in Chennai , Visit Inoventic Creative Agency Today..

    ReplyDelete
  31. This is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.

    Website Design and Development Company

    Website Design Company

    Website Development Company

    Wordpress Customization comapany

    SEO Company

    digital marketing company

    ReplyDelete
  32. The best php application development, company in India. We contribute high quality custom php website development, services from our well-trained team. Get to know more about the php development company, in Chennai Reach us or just give a call to us for php development.

    ReplyDelete
  33. As always your articles do inspire me. Every single detail you have posted was great. ExcelR Pune Digital Marketing Course

    ReplyDelete
  34. The content that I normally see is nothing like what you have written. This is very well-thought out and well-planned. You are a unique thinker and bring up great individualized points. Please continue your work.
    Best Data Science training in Mumbai

    Data Science training in Mumbai

    ReplyDelete
  35. I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective.share more
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

    ReplyDelete
  36. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    Data Science Institute in Bangalore

    ReplyDelete
  37. I don t have the time at the moment to fully read your site but I have bookmarked it and also add your RSS feeds. I will be back in a day or two. thanks for a great site.
    Data Science Course in Bangalore

    ReplyDelete
  38. Two full thumbs up for this magneficent article of yours. I've really enjoyed reading this article today and I think this might be one of the best article that I've read yet. Please, keep this work going on in the same quality.
    Data Science Training in Bangalore

    ReplyDelete
  39. Thanks a lot for sharing such a good source with all, i appreciate your efforts taken for the same. I found this worth sharing and must share this with all.

    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery









    ReplyDelete
  40. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end. Software Testing Training in Chennai | Software Testing Training in Anna Nagar | Software Testing Training in OMR | Software Testing Training in Porur | Software Testing Training in Tambaram | Software Testing Training in Velachery

    ReplyDelete
  41. If you are looking to buy Instagram followers cheap,buy Instagram followers, likes and views there is no better place than instaHotStar. We offer exclusive Instagram Power likes, followers, views for a price as low as $0.89

    ReplyDelete
  42. I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.

    Data Science Course

    ReplyDelete
  43. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

    Data Science Training

    ReplyDelete