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

Random Server Crashes, 4.1.0 #181

Closed
pankajsoni19 opened this issue Feb 1, 2021 · 3 comments
Closed

Random Server Crashes, 4.1.0 #181

pankajsoni19 opened this issue Feb 1, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@pankajsoni19
Copy link

I updated swift dependencies. And now I am getting this on server start

Fatal error: No redis found for id default, or the app may not have finished booting. Also, the eventLoop must be from Application's EventLoopGroup.: file Redis/RedisStorage.swift, line 51
@pankajsoni19 pankajsoni19 added the bug Something isn't working label Feb 1, 2021
@pankajsoni19
Copy link
Author

forcing eventloop group will cause a major re-write for me in massive codebase. is there some alternative

@pankajsoni19 pankajsoni19 changed the title Server initialization failure Random Server Crashes Feb 3, 2021
@pankajsoni19
Copy link
Author

In last couple of days, my server environment has gotten very unstable. With random crashes throughout.
I think I have zeroed in on the issue.

in same query if I access redis and mysql, eventloop's get messed up and server crashes. as an example.

this sort of pattern is present mostly in code. check cache, miss -> checkdb -> update cache -> result -> crash

func status(_ req: Request) throws -> Future<Status> {
     return User.query(on: req.db).group(.or) {
            $0.filter(\.$id == login.user).filter(\.$email == login.user)
        }
        .first()
        .flatMap {
           // update redis ->
        }
        .transform to result
}

I reverted to 4.0.0. Whatever changes you guys have done, need testing.

@pankajsoni19 pankajsoni19 changed the title Random Server Crashes Random Server Crashes, 4.1.0 Feb 3, 2021
@pankajsoni19
Copy link
Author

duplicate of #180.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant