Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Bug: [Memcached] session_start(): Unable to clear session lock record

未關閉
#7,604 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

  • #10209 來自 @jalexiscv —— 已關閉,未合併

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
memcached, php
領域
backend

研究方向

從 SYSTEMPATH/Session/Session.php 第 928 行開始,追蹤呼叫 session_start() 的 startSession() 路徑。在 PHP 8.2 上使用 Memcached 處理多個並行 AJAX 請求,重現該失敗,並將行為與預期的 JSON 回應進行比較。當並行請求不再回報 session lock-record 錯誤時,問題即已解決。

由索引模型根據 Issue 內容生成。

描述

bug can of worms
PHP Version

8.2

CodeIgniter4 Version

4.3.2

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

fpm-fcgi

Database

Mysql 5.7

What happened?

I have configured session store as memcached, it was working fine in PHP 7.1 with codeIgniter 2,

After upgrading PHP 7.1 to 8.2 and codeIgniter 2 to 4 I am getting an error on multiple async ajax call

session_start(): Unable to clear session lock record
in SYSTEMPATH/Session/Session.php on line 928.
 1 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler()
 2 SYSTEMPATH/Session/Session.php(928): session_start()
 3 SYSTEMPATH/Session/Session.php(250): CodeIgniter\Session\Session->startSession()
 4 SYSTEMPATH/Config/Services.php(674): CodeIgniter\Session\Session->start()
 5 SYSTEMPATH/Config/BaseService.php(252): CodeIgniter\Config\Services::session()
 6 SYSTEMPATH/Config/BaseService.php(193): CodeIgniter\Config\BaseService::__callStatic()
 7 SYSTEMPATH/Config/Services.php(641): CodeIgniter\Config\BaseService::getSharedInstance()
 8 SYSTEMPATH/Config/BaseService.php(252): CodeIgniter\Config\Services::session()
 9 SYSTEMPATH/Common.php(988): CodeIgniter\Config\BaseService::__callStatic()

codeIgniter official website also suggests to use session_write_close() for resolving this issue. But this did not work for ajax concurrent call.

Steps to Reproduce

When I am calling multiple sync ajax than getting error

Expected Output

Getting Json Response

Anything else?

No response

主要語言
PHP
星號
6k
分支
2k
平均合併
1 天 22 小時
30 天內合併 PR
59

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codeigniter4/CodeIgniter4 的其他 Issue

查看 codeigniter4/CodeIgniter4 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。