THIS SESSION HAS BEEN INACTIVE FOR TOO LONG. PLEASE REFRESH THIS PAGE.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.5k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
The timeout is too fast, it will prompt “THIS SESSION HAS BEEN INACTIVE FOR TOO LONG. PLEASE REFRESH THIS PAGE.” soon
The request web server log
```
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | gradio_web_server | add_text. ip: XXXXXX . len: 2
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | gradio_web_server | inactive. ip: XXXXXX . text: hi
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/api/predict "HTTP/1.1 200 OK"
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/reset "HTTP/1.1 200 OK"
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | gradio_web_server | bot_response. ip: XXXXX
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/api/predict "HTTP/1.1 200 OK"
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/api/predict "HTTP/1.1 200 OK"
Jul 24 16:58:32 ecs-a164 startWeb.sh[20335]: 2023-07-24 16:58:32 | INFO | httpx | HTTP Request: POST http://localhost:7868/reset "HTTP/1.1 200 OK"
```
The front show:

start:
```
su - admin
source /home/admin/.bashrc
conda activate llama27bchathf
python3 -m fastchat.serve.controller --host localhost --port 21018
python3 -m fastchat.serve.model_worker --model-path /var/www/data/fastchat/Llama-2-7b-chat-hf --host localhost --port 31018 --controller http://localhost:21018 --worker http://localhost:31018
python3 -m fastchat.serve.gradio_web_server --port 7868 --host 0.0.0.0 --controller http://localhost:21018
python3 -m fastchat.serve.openai_api_server --port 8008 --host 0.0.0.0 --controller http://localhost:21018
```
I don't know if modify config file: fastchat/constants.py can solve this problem?
```
# Session expiration time
SESSION_EXPIRATION_TIME = 3600
```
# 临时解决办法
我现在进行了临时解决办法,就是将web的老版本,比如运行老版本的 v0.2.7 这个版本,Web就比较正常。
pip3 install fschat==v0.2.7
所以Web段我用老版本的跑是比较正常的。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with fastchat/constants.py and the gradio_web_server entry point, then compare the current behavior with the reported v0.2.7 behavior. Reproduce the session-expiration prompt using the supplied launch commands and logs; done means the web session no longer expires prematurely while the intended expiration behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100