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

PRAGMA foreign_keys = ON running indefinitely when the app starts #1111

Open
nowfalsalahudeen opened this issue Dec 28, 2024 · 2 comments
Open
Labels

Comments

@nowfalsalahudeen
Copy link

           https://loco.rs

environment: development
database: logging
logger: debug
compilation: debug
modes: server

listening on http://0.0.0.0:5150
2024-12-28T19:25:15.432676Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=57.25µs elapsed_secs=5.725e-5
2024-12-28T19:25:16.435989Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=77.375µs elapsed_secs=7.7375e-5
2024-12-28T19:25:17.441806Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=106.25µs elapsed_secs=0.00010625
2024-12-28T19:25:18.445835Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=120.292µs elapsed_secs=0.000120292
2024-12-28T19:25:19.448673Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=101.959µs elapsed_secs=0.000101959
2024-12-28T19:25:20.453538Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=106.833µs elapsed_secs=0.000106833
2024-12-28T19:25:21.455870Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=68.333µs elapsed_secs=6.8333e-5
2024-12-28T19:25:22.459530Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=64.542µs elapsed_secs=6.4542e-5
2024-12-28T19:25:22.964399Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=128.208µs elapsed_secs=0.000128208
2024-12-28T19:25:23.967428Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=100.459µs elapsed_secs=0.000100459
2024-12-28T19:25:24.970873Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=80.209µs elapsed_secs=8.0209e-5
2024-12-28T19:25:25.976840Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=130.958µs elapsed_secs=0.000130958
2024-12-28T19:25:26.980858Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=123.25µs elapsed_secs=0.00012325
2024-12-28T19:25:27.983811Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=56.291µs elapsed_secs=5.6291e-5
2024-12-28T19:25:28.486065Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=66.292µs elapsed_secs=6.6292e-5
2024-12-28T19:25:28.989515Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=95.625µs elapsed_secs=9.5625e-5
2024-12-28T19:25:29.991365Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=27.041µs elapsed_secs=2.7041e-5
2024-12-28T19:25:30.497174Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=110.833µs elapsed_secs=0.000110833
2024-12-28T19:25:31.500019Z INFO sqlx::query: summary="PRAGMA foreign_keys = ON; …" db.statement="\n\nPRAGMA foreign_keys = ON;\n" rows_affected=0 rows_returned=0 elapsed=104.125µs elapsed_secs=0.000104125
^C2024-12-28T19:25:32.008527Z INFO loco_rs::app: shutting down...

Why is it running indefinitely? In the configuration, database logging is set to true.

@kaplanelad
Copy link
Contributor

@nowfalsalahudeen Could you please provide more details or clarify the issue you're experiencing? It will help us assist you better."

@kaplanelad kaplanelad added the db label Jan 5, 2025
@nowfalsalahudeen
Copy link
Author

nowfalsalahudeen commented Jan 6, 2025

kaplanelad
image

image

after enabled both logging
this is the output, it keeps running,

image

and if i change the min_connection to 2, it prints twice,

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

No branches or pull requests

2 participants