error sending end packet,processCallbacks status 2

本文探讨了Tomcat频繁宕机的原因,重点分析了GC问题,并提供了相关解决方案。同时,对于截图代码导致的问题进行了排查,指出可能是事务使用不当所致。文中还分享了优化配置和使用工具进行压力测试的经验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这是我继上一篇文章[url=/blog/259676]多个tomcat同一个apache,使用jk建立关系时常出错![/url]提到的配置:
最近忙于项目进度,就停了一段时间。
调试和优化的工作展开了,昨个用jmeter做了压力测试,同样有这样的错误,代码貌似没大问题。
小弟对apache这东西比较生疏,贴出张图,如有帮忙有其他需要立刻到位!
还请各位帮忙看看,谢谢!

[img]/upload/attachment/53799/5e4f60f6-aa14-3911-9d32-b012748559fb.jpg" alt="[/img]
 
在网上找了一圈,有相同问题的也不少(包括不定期可能能访问速度超慢,导致tomcat停止服务),
给的提示也有,具体的解决方案没有,或者怎么能没有这个提示?
是不是这个原因导致隔几天(不确定,有的时候2,3天,最多一个多星期)就出现tomcat停止服务?
我因该如何入手解决这两问题 ,还请大伙帮忙分析下!!!
 
<span style="color: #ff0000;">[b]问题之后就解决了,没心思来写,这不,最近看着不爽,作个结尾:[/b]</span>
<span style="color: #ff0000;">[b]tomcat常常宕机是gc问题,je上面有几篇不错得文章提到了,在此我就不多说了,可以去搜搜看。[/b]</span>
<span style="color: #ff0000;">[b]代码搓导致截图得问题,包括使用spring了却没有事务。。[/b]</span>
 
我在开发一个适老化服务平台, 现在正在开发健康板块下的一个在线问诊功能, 我引进了gpt-2模型进行回复功能, 但现在我在前端, 客户端界面发起问诊时, 后端无法正常调用模型生成回复现在应该怎么做 D:\Soft\app\anaconda\python.exe "D:\GDUT\projectdata\python\pythonProject\Eldly service platform\main.py" 2025-05-11 14:57:35,717 - INFO - Received Socket.IO status: {'message': 'Connected to server'} 2025-05-11 14:57:35,718 - INFO - Socket.IO connection opened. 2025-05-11 14:57:35,724 - WARNING - 无法找到背景图片:Data/Background.png 无法加载背景图片 2025-05-11 14:57:49,961 - INFO - Consult message sent successfully. 2025-05-11 14:57:50,228 - INFO - Received Socket.IO message: {'from': '张医生', 'message': '迷是�'} 2025-05-11 14:58:40,478 - INFO - Attempting to book exam: 常规体检 on 2025-05-11 2025-05-11 14:58:42,546 - ERROR - Booking request failed: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5000/api/book_exam 2025-05-11 14:58:56,119 - INFO - Attempting to book exam: 常规体检 on 2025-05-11 2025-05-11 14:58:58,170 - ERROR - Booking request failed: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5000/api/book_exam 进程已结束,退出代码为 -1 前端输出日志 D:\Soft\app\anaconda\python.exe "D:\GDUT\projectdata\python\pythonProject\Eldly service platform\Community_process.py" Server initialized for threading. 2025-05-11 14:57:11,013 - INFO - Server initialized for threading. 2025-05-11 14:57:11,015 - INFO - Database initialized successfully. 2025-05-11 14:57:11,015 - INFO - Loading GPT-2 model... Database tables created successfully! Device set to use cpu 2025-05-11 14:57:11,938 - INFO - GPT-2 model loaded successfully. 2025-05-11 14:57:11,938 - INFO - Starting Flask server on http://localhost:5000... 2025-05-11 14:57:11,939 - WARNING - Werkzeug appears to be used in a production deployment. Consider switching to a production web server instead. 2025-05-11 14:57:11,948 - INFO - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Serving Flask app 'Community_process' * Debug mode: off * Running on http://localhost:5000 2025-05-11 14:57:11,948 - INFO - Press CTRL+C to quit 2025-05-11 14:57:18,192 - INFO - Health check request received. 2025-05-11 14:57:18,192 - INFO - 127.0.0.1 - - [11/May/2025 14:57:18] "GET / HTTP/1.1" 200 - fR7RxP4HZVl2KOItAAAA: Sending packet OPEN data {'sid': 'fR7RxP4HZVl2KOItAAAA', 'upgrades': ['websocket'], 'pingTimeout': 20000, 'pingInterval': 25000, 'maxPayload': 1000000} 2025-05-11 14:57:33,658 - INFO - fR7RxP4HZVl2KOItAAAA: Sending packet OPEN data {'sid': 'fR7RxP4HZVl2KOItAAAA', 'upgrades': ['websocket'], 'pingTimeout': 20000, 'pingInterval': 25000, 'maxPayload': 1000000} 2025-05-11 14:57:33,660 - INFO - 127.0.0.1 - - [11/May/2025 14:57:33] "GET /socket.io/?transport=polling&EIO=4&t=1746946651.6086588 HTTP/1.1" 200 - fR7RxP4HZVl2KOItAAAA: Received request to upgrade to websocket 2025-05-11 14:57:35,713 - INFO - fR7RxP4HZVl2KOItAAAA: Received request to upgrade to websocket fR7RxP4HZVl2KOItAAAA: Upgrade to websocket successful 2025-05-11 14:57:35,716 - INFO - fR7RxP4HZVl2KOItAAAA: Upgrade to websocket successful fR7RxP4HZVl2KOItAAAA: Received packet MESSAGE data 0{} 2025-05-11 14:57:35,716 - INFO - fR7RxP4HZVl2KOItAAAA: Received packet MESSAGE data 0{} 2025-05-11 14:57:35,717 - INFO - Client connected to WebSocket emitting event "status" to hPVrGdOiqB-_O4AEAAAB [/] 2025-05-11 14:57:35,717 - INFO - emitting event "status" to hPVrGdOiqB-_O4AEAAAB [/] fR7RxP4HZVl2KOItAAAA: Sending packet MESSAGE data 2["status",{"message":"Connected to server"}] 2025-05-11 14:57:35,717 - INFO - fR7RxP4HZVl2KOItAAAA: Sending packet MESSAGE data 2["status",{"message":"Connected to server"}] fR7RxP4HZVl2KOItAAAA: Sending packet MESSAGE data 0{"sid":"hPVrGdOiqB-_O4AEAAAB"} 2025-05-11 14:57:35,717 - INFO - fR7RxP4HZVl2KOItAAAA: Sending packet MESSAGE data 0{"sid":"hPVrGdOiqB-_O4AEAAAB"} fR7RxP4HZVl2KOItAAAA: Received packet MESSAGE data 2["message",{"message":"\u6211\u5934\u75db","doctor_name":"\u5f20\u533b\u751f","user_id":"elder_user_001"}] 2025-05-11 14:57:49,962 - INFO - fR7RxP4HZVl2KOItAAAA: Received packet MESSAGE data 2["message",{"message":"\u6211\u5934\u75db","doctor_name":"\u5f20\u533b\u751f","user_id":"elder_user_001"}] received event "message" from hPVrGdOiqB-_O4AEAAAB [/] 2025-05-11 14:57:49,962 - INFO - received event "message" from hPVrGdOiqB-_O4AEAAAB [/] 2025-05-11 14:57:49,963 - INFO - Received WebSocket message: {'message': '我头痛', 'doctor_name': '张医生', 'user_id': 'elder_user_001'} Truncation was not explicitly activated but `max_length` is provided a specific value, please use `truncation=True` to explicitly truncate examples to max length. Defaulting to 'longest_first' truncation strategy. If you encode pairs of sequences (GLUE-style) with the tokenizer you can select this strategy more precisely by providing a specific strategy to `truncation`. Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation. 2025-05-11 14:57:50,210 - INFO - Generated response for 张医生: 迷是�... 2025-05-11 14:57:50,228 - ERROR - Database error during consultation storage: (sqlite3.OperationalError) no such column: users.age [SQL: SELECT users.id AS users_id, users.username AS users_username, users.age AS users_age, users.gender AS users_gender, users.phone AS users_phone, users.address AS users_address, users.emergency_contact AS users_emergency_contact, users.emergency_phone AS users_emergency_phone, users.created_at AS users_created_at FROM users WHERE users.id = ?] [parameters: ('elder_user_001',)] (Background on this error at: https://sqlalche.me/e/20/e3q8) emitting event "message" to hPVrGdOiqB-_O4AEAAAB [/] 2025-05-11 14:57:50,228 - INFO - emitting event "message" to hPVrGdOiqB-_O4AEAAAB [/] fR7RxP4HZVl2KOItAAAA: Sending packet MESSAGE data 2["message",{"from":"\u5f20\u533b\u751f","message":"\u8ff7\u662f\ufffd"}] 2025-05-11 14:57:50,228 - INFO - fR7RxP4HZVl2KOItAAAA: Sending packet MESSAGE data 2["message",{"from":"\u5f20\u533b\u751f","message":"\u8ff7\u662f\ufffd"}] fR7RxP4HZVl2KOItAAAA: Sending packet PING data None 2025-05-11 14:57:58,660 - INFO - fR7RxP4HZVl2KOItAAAA: Sending packet PING data None fR7RxP4HZVl2KOItAAAA: Received packet PONG data 2025-05-11 14:57:58,661 - INFO - fR7RxP4HZVl2KOItAAAA: Received packet PONG data fR7RxP4HZVl2KOItAAAA: Sending packet PING data None 2025-05-11 14:58:23,662 - INFO - fR7RxP4HZVl2KOItAAAA: Sending packet PING data None fR7RxP4HZVl2KOItAAAA: Received packet PONG data 2025-05-11 14:58:23,662 - INFO - fR7RxP4HZVl2KOItAAAA: Received packet PONG data 2025-05-11 14:58:42,538 - INFO - Received exam booking request. 2025-05-11 14:58:42,538 - ERROR - Exception on /api/book_exam [POST] Traceback (most recent call last): File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context self.dialect.do_execute( File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute cursor.execute(statement, parameters) sqlite3.OperationalError: no such column: users.age The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\Soft\app\anaconda\Lib\site-packages\flask\app.py", line 1473, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\flask\app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\GDUT\projectdata\python\pythonProject\Eldly service platform\Community_process.py", line 62, in book_exam user = session.get(User, user_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\session.py", line 3682, in get return self._get_impl( ^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\session.py", line 3862, in _get_impl return db_load_fn( ^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\loading.py", line 694, in load_on_pk_identity session.execute( File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute return self._execute_internal( ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\session.py", line 2236, in _execute_internal result: Result[Any] = compile_state_cls.orm_execute_statement( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\context.py", line 293, in orm_execute_statement result = conn.execute( ^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1418, in execute return meth( ^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\sql\elements.py", line 515, in _execute_on_connection return connection._execute_clauseelement( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1640, in _execute_clauseelement ret = self._execute_context( ^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context return self._exec_single_context( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context self._handle_dbapi_exception( File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 2353, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context self.dialect.do_execute( File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: users.age [SQL: SELECT users.id AS users_id, users.username AS users_username, users.age AS users_age, users.gender AS users_gender, users.phone AS users_phone, users.address AS users_address, users.emergency_contact AS users_emergency_contact, users.emergency_phone AS users_emergency_phone, users.created_at AS users_created_at FROM users WHERE users.id = ?] [parameters: ('elder_user_001',)] (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-05-11 14:58:42,546 - INFO - 127.0.0.1 - - [11/May/2025 14:58:42] "POST /api/book_exam HTTP/1.1" 500 - fR7RxP4HZVl2KOItAAAA: Sending packet PING data None 2025-05-11 14:58:48,664 - INFO - fR7RxP4HZVl2KOItAAAA: Sending packet PING data None fR7RxP4HZVl2KOItAAAA: Received packet PONG data 2025-05-11 14:58:48,664 - INFO - fR7RxP4HZVl2KOItAAAA: Received packet PONG data 2025-05-11 14:58:58,165 - INFO - Received exam booking request. 2025-05-11 14:58:58,167 - ERROR - Exception on /api/book_exam [POST] Traceback (most recent call last): File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context self.dialect.do_execute( File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute cursor.execute(statement, parameters) sqlite3.OperationalError: no such column: users.age The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\Soft\app\anaconda\Lib\site-packages\flask\app.py", line 1473, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\flask\app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\GDUT\projectdata\python\pythonProject\Eldly service platform\Community_process.py", line 62, in book_exam user = session.get(User, user_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\session.py", line 3682, in get return self._get_impl( ^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\session.py", line 3862, in _get_impl return db_load_fn( ^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\loading.py", line 694, in load_on_pk_identity session.execute( File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute return self._execute_internal( ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\session.py", line 2236, in _execute_internal result: Result[Any] = compile_state_cls.orm_execute_statement( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\orm\context.py", line 293, in orm_execute_statement result = conn.execute( ^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1418, in execute return meth( ^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\sql\elements.py", line 515, in _execute_on_connection return connection._execute_clauseelement( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1640, in _execute_clauseelement ret = self._execute_context( ^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context return self._exec_single_context( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context self._handle_dbapi_exception( File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 2353, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context self.dialect.do_execute( File "D:\Soft\app\anaconda\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: users.age [SQL: SELECT users.id AS users_id, users.username AS users_username, users.age AS users_age, users.gender AS users_gender, users.phone AS users_phone, users.address AS users_address, users.emergency_contact AS users_emergency_contact, users.emergency_phone AS users_emergency_phone, users.created_at AS users_created_at FROM users WHERE users.id = ?] [parameters: ('elder_user_001',)] (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-05-11 14:58:58,170 - INFO - 127.0.0.1 - - [11/May/2025 14:58:58] "POST /api/book_exam HTTP/1.1" 500 - fR7RxP4HZVl2KOItAAAA: Sending packet PING data None 2025-05-11 14:59:13,665 - INFO - fR7RxP4HZVl2KOItAAAA: Sending packet PING data None fR7RxP4HZVl2KOItAAAA: Received packet PONG data 2025-05-11 14:59:13,665 - INFO - fR7RxP4HZVl2KOItAAAA: Received packet PONG data 2025-05-11 14:59:23,613 - INFO - Client disconnected from WebSocket 2025-05-11 14:59:23,613 - INFO - 127.0.0.1 - - [11/May/2025 14:59:23] "GET /socket.io/?transport=websocket&EIO=4&sid=fR7RxP4HZVl2KOItAAAA&t=1746946653.6612737 HTTP/1.1" 200 - 进程已结束,退出代码为 -1 后端输出日志
最新发布
05-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值