Failure recovery
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- fsharp, sql
- Domain
- backend, databases, networking
Research direction
Begin with GetDataContext() and the behavior described for static connections, then read the related infrastructure discussion in #238. Done requires an agreed scope for recovery helpers and a reproducible account of the broken-connection and empty-dictionary cases.
Written by the indexing model from the issue text.
Description
I have a (quite common scenario I suppose) web server using SQLProvider to connect a database that is located on a different server.
Sometimes the network connection does fail. That is the nature of HTTP. I try to deal with that having a retry logics when calling GetDataContext().
Now, if the web-server runs a maintenance boot (Windows update) and the network connection is not up and running when the server restarts, this is what happens:
- Server will start, but the connection is in a broken state
- If the connection is stored to a static variable, all the queries will crash on runtime even when the connection has been restored. Maybe because the column dictionary is empty or something.
- This can be fixed by accessing the connection as a function, having a backing-field for the connection, and creating it again if it's null.
- Another problem seems to be that if the server is running for long time, it seems that the primary-key dictionary goes to empty. This will cause update clauses not to work. I don't know yet the scenario and why but I think it's again about network connection breakups.
Besides that, there is more generic infrastructure, described more detailed in #238 but that started to be off-topic so I started a new issue.
Should we have some kind of extra-functions-namespace (like namespace FSharp.Data.Sql.Extensions) in SQLProvider to provide customers some tools to fight with this kind of nasty real life problems?
- Dominant language
- F#
- Stars
- 627
- Forks
- 147
- Avg merge
- 2h 2m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fsprojects/SQLProvider
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
fsprojects/SQLProvider#872 · 2 comments ·
-
Repo Assist? Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 10/100
fsprojects/SQLProvider#870 · 1 comment ·
-
postgresql
Difficulty 4/5 3-5 days Newbie friendliness 58/100
fsprojects/SQLProvider#869 · 2 comments ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
fsprojects/SQLProvider#868 · 2 comments ·
-
sql server
Difficulty 4/5 3-5 days Newbie friendliness 45/100
fsprojects/SQLProvider#851 · 1 comment ·
All issues in fsprojects/SQLProvider
Similar issues
-
area/sessions comp/agent P2 tool/skills type/perf
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NousResearch/hermes-agent#117788 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·