Does xorm open multiple connections for reading data from cached tables? #475
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#475
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We are using xorm with our apiserver. We cache few config-type tables using LRUCacher of xorm. We have noticed that when
get
operations are performed on those tables, 2 connections are opened. One connection is the actual connection opened from our code. The other connection is used by xorm to perform an inner query. Can you please confirm that is how xorm works?We are interested in understanding this because I think this is causing deadlocks in our server. We set maxOpenConnection = 2. Now when 2 simultaneous api calls are made, sometimes both response handlers get stuck in the innerquery, waiting for new connection (see attached pprof stack trace).
Thanks @lunny 💯