Comments (17)
You can store cases and samples in MySQL if you want, but it's optional really. Yes, MongoDB is not used at all here so yes, it should be removed
OK I understand! OK I'll remove the dependency.
from chanjo2.
I think this will fix it. Closing for now. Reopening if it comes back.
from chanjo2.
It looks like this update fixed the error - the logs look clean now.
We still have the issue with Chanjo2 not running after every weekend though 🤔 But seems more and more likely that this is related to our setup rather than Chanjo2.
Anyway, I think this issue is resolved. I'll continue digging. If it still seems related to Chanjo2 internals, I'll be back with a separate issue.
from chanjo2.
Hi @Jakob37, we never saw this error but I guess it's because we don't use uvicorn as a runner, like you guys do. We don't have to have uvicorn handling the logging. I'll open a PR with a change
from chanjo2.
Hi @Jakob37, we never saw this error but I guess it's because we don't use uvicorn as a runner, like you guys do. We don't have to have uvicorn handling the logging. I'll open a PR with a change
OK thanks!
from chanjo2.
What's the code you use to start the server? Are you logging to file?
from chanjo2.
Also, are you passing a log config file when you start the app?
from chanjo2.
What's the code you use to start the server? Are you logging to file?
Here is the command we use to start Chanjo2:
command: ["uvicorn", "chanjo2.main:app", "--host=0.0.0.0", "--port=8000", "--workers=2", "--log-level=info", "--root-path=/chanjo2"]
Also, are you passing a log config file when you start the app?
Hmm, looks like not, not intentionally at least.
from chanjo2.
Hmm, looks like not, not intentionally at least.
We don't have a log config file either. It's weird, because if the app works fine with the command you mentioned I don't understand why you get that error over weekends. I'm not sure how to fix the logging since I don't understand what's really going on.
Looks like the app is restarted in the wrong way by some process because you get a call to lifespan. Chanjo2 is working with a MySQL database so it shouldn't be affected by the MongoDB backups. Please try to investigate a bit more what can be trying to restart chanjo2 on your side.
from chanjo2.
Hmm, looks like not, not intentionally at least.
We don't have a log config file either. It's weird, because if the app works fine with the command you mentioned I don't understand why you get that error over weekends. I'm not sure how to fix the logging since I don't understand what's really going on. Looks like the app is restarted in the wrong way by some process because you get a call to lifespan. Chanjo2 is working with a MySQL database so it shouldn't be affected by the MongoDB backups. Please try to investigate a bit more what can be trying to restart chanjo2 on your side.
OK, I'll investigate a bit more!
from chanjo2.
OK, I'll investigate a bit more!
One thing that comes to my mind is that perhaps database and logging initiation should be present on a app startup function and not on a lifespan one (which gets executed also when the app stops or reboots)- I'll fix accordingly, and perhaps this will solve your issue
from chanjo2.
Chanjo2 is working with a MySQL database so it shouldn't be affected by the MongoDB backups.
Hmm, aha. I had misunderstood here. I thought the SQL database was used only for intervals, but I see now that it also stores the cases and samples.
I currently have the mongodb container as a dependency for Chanjo2. Maybe that is part of what is happening here. I'll remove it.
from chanjo2.
You can store cases and samples in MySQL if you want, but it's optional really. Yes, MongoDB is not used at all here so yes, it should be removed
from chanjo2.
Looks like it came back, without the mongodb dependency and with the updated version running the log statement from within the lifetime method.
I guess there are two parts here.
(1) Why is Chanjo2 restarting (must be something in our setup)
(2) Why does it crash on logging
I'll see if I can configure uvicorn somehow such that it doesn't crash on logging.
from chanjo2.
Question @northwestwitch , in the logger.py
, specifically this part:
if LOG.handlers:
LOG.handlers[0].setFormatter(console_formatter)
else:
logging.basicConfig()
If the else-statement is hit for some reason, logging.basicConfig()
is called. This does not seem to update the LOG
instance, which later is used. Could this cause issues?
Anyway, I'll try to see if I can reproduce the error on my laptop. I think with a quicker cycle, I should be able to pinpoint the error.
from chanjo2.
Ok! I'll look into it
from chanjo2.
Anyway, I think this issue is resolved. I'll continue digging. If it still seems related to Chanjo2 internals, I'll be back with a separate issue.
Please do that! Thanks for reporting and sorry if we couldn't pinpoint the issue better
from chanjo2.
Related Issues (20)
- On report page, add one more field to specify a list of completeness cutoffs for the stats HOT 1
- Completeness cutoff on report has no memory of submitted form when page is refreshed
- Js errors on report page
- Lib import error while connecting to MySQL using MacOS HOT 1
- Failed to load API definition for Chanjo2 API HOT 7
- On report page, customize search to allow also HGNC symbols and Ensembl IDs
- Server timeout when loading exons HOT 13
- Trouble getting /report calls to the correct end point, round 2 HOT 4
- Modify report endpoints to only accept forms and not json data? HOT 6
- Detailed gene info in main report HOT 2
- Issues with customizing report through gene panel name HOT 3
- Occasionally large differences in coverage for same gene region in same sample HOT 11
- Can't install mysqlclient on macOS
- Warnings by the black (lint) action
- Address security alerts
- Improve performance of get_coverage_completeness.py HOT 5
- Minimal stats endpoint for delivery reports in scout HOT 3
- Clarify "Average coverage" HOT 2
- Handle errors for condensed stats endpoint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chanjo2.