Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"MySQL server has gone away (BrokenPipeError(32, 'Broken pipe')) #7

Open
JerryCheng1 opened this issue May 27, 2019 · 3 comments
Open

Comments

@JerryCheng1
Copy link

peewee 用旧的session登录持续超过了8个小时,第二天会失效

@JerryCheng1
Copy link
Author

manage.py

#!/usr/bin/env python3
import os
from app import create_app
from flask_script import Manager, Server
from app.models import db
from playhouse.flask_utils import FlaskDB

app = create_app(os.getenv('FLASK_CONFIG') or 'default')
FlaskDB(app, db)
manager = Manager(app)
server = Server(host="0.0.0.0", port=9012)
manager.add_command("runserver", server)


@manager.command
def test():
    import unittest
    tests = unittest.TestLoader().discover('tests')
    unittest.TextTestRunner(verbosity=2).run(tests)

if __name__ == '__main__':
    manager.run()

@liugang1014
Copy link

这个有解决吗?空闲超过8小时数据库就无法访问了。

@JerryCheng1
Copy link
Author

这个有解决吗?空闲超过8小时数据库就无法访问了。

解决就是换语言,换框架

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants