goroutine profile: total 66 16 @ 0x490fca 0x469137 0x10cdb75 0x498401 # 0x10cdb74 github.com/FerretDB/FerretDB/internal/util/ctxutil.WithDelay.func1+0xb4 github.com/FerretDB/FerretDB/internal/util/ctxutil/ctxutil.go:37 16 @ 0x490fca 0x469137 0x13a4cc5 0x498401 # 0x13a4cc4 github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run.func2+0x84 github.com/FerretDB/FerretDB/internal/clientconn/conn.go:161 15 @ 0x490fca 0x44fb77 0x4901c5 0x50da27 0x50eaa8 0x50ea96 0x5ba365 0x5c9ec5 0x8ad793 0x4a6d63 0xc00fc5 0xc00f7b 0xc000f0 0x13a0fd6 0x13a5dff 0x498401 # 0x4901c4 internal/poll.runtime_pollWait+0x84 runtime/netpoll.go:351 # 0x50da26 internal/poll.(*pollDesc).wait+0x26 internal/poll/fd_poll_runtime.go:84 # 0x50eaa7 internal/poll.(*pollDesc).waitRead+0x2a7 internal/poll/fd_poll_runtime.go:89 # 0x50ea95 internal/poll.(*FD).Read+0x295 internal/poll/fd_unix.go:170 # 0x5ba364 net.(*netFD).Read+0x24 net/fd_posix.go:68 # 0x5c9ec4 net.(*conn).Read+0x44 net/net.go:196 # 0x8ad792 bufio.(*Reader).Read+0x192 bufio/bufio.go:245 # 0x4a6d62 io.ReadAtLeast+0x82 io/io.go:335 # 0xc00fc4 io.ReadFull+0x64 io/io.go:354 # 0xc00f7a github.com/FerretDB/wire.(*MsgHeader).readFrom+0x1a github.com/FerretDB/wire@v0.1.7/msg_header.go:64 # 0xc000ef github.com/FerretDB/wire.ReadMessage+0x4f github.com/FerretDB/wire@v0.1.7/msg_body.go:61 # 0x13a0fd5 github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run+0xbb5 github.com/FerretDB/FerretDB/internal/clientconn/conn.go:256 # 0x13a5dfe github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1+0x57e github.com/FerretDB/FerretDB/internal/clientconn/listener.go:294 2 @ 0x490fca 0x469137 0x573109 0x498401 # 0x573108 database/sql.(*DB).connectionOpener+0x88 database/sql/sql.go:1266 2 @ 0x498401 1 @ 0x4224c9 0x4931b8 0x59f0d3 0x498401 # 0x4931b7 os/signal.signal_recv+0x97 runtime/sigqueue.go:152 # 0x59f0d2 os/signal.loop+0x12 os/signal/signal_unix.go:23 1 @ 0x44c251 0x48fd3d 0xb6c711 0xb6c3e5 0xb69349 0x14b7054 0x14b7a9c 0xafffc9 0xb01baf 0xb2410e 0xafe2fc 0x498401 # 0xb6c710 runtime/pprof.writeRuntimeProfile+0xb0 runtime/pprof/pprof.go:848 # 0xb6c3e4 runtime/pprof.writeGoroutine+0x44 runtime/pprof/pprof.go:781 # 0xb69348 runtime/pprof.(*Profile).WriteTo+0x148 runtime/pprof/pprof.go:405 # 0x14b7053 net/http/pprof.handler.ServeHTTP+0x553 net/http/pprof/pprof.go:272 # 0x14b7a9b net/http/pprof.Index+0xdb net/http/pprof/pprof.go:391 # 0xafffc8 net/http.HandlerFunc.ServeHTTP+0x28 net/http/server.go:2358 # 0xb01bae net/http.(*ServeMux).ServeHTTP+0x1ce net/http/server.go:2923 # 0xb2410d net/http.serverHandler.ServeHTTP+0x8d net/http/server.go:3436 # 0xafe2fb net/http.(*conn).serve+0x6db net/http/server.go:2157 1 @ 0x490fca 0x41c96e 0x41c492 0x13a3a32 0x14ec465 0x14ea8f5 0x456b87 0x498401 # 0x13a3a31 github.com/FerretDB/FerretDB/internal/clientconn.(*Listener).Run+0x211 github.com/FerretDB/FerretDB/internal/clientconn/listener.go:196 # 0x14ec464 main.run+0x12e4 github.com/FerretDB/FerretDB/cmd/ferretdb/main.go:604 # 0x14ea8f4 main.main+0x74 github.com/FerretDB/FerretDB/cmd/ferretdb/main.go:234 # 0x456b86 runtime.main+0x426 runtime/proc.go:302 1 @ 0x490fca 0x41c96e 0x41c492 0x14e7366 0x14eea1f 0x498401 # 0x14e7365 github.com/FerretDB/FerretDB/internal/util/debug.(*Handler).Serve+0x6a5 github.com/FerretDB/FerretDB/internal/util/debug/debug.go:324 # 0x14eea1e main.run.func3+0x33e github.com/FerretDB/FerretDB/cmd/ferretdb/main.go:480 1 @ 0x490fca 0x41c96e 0x41c492 0x14eeb35 0x498401 # 0x14eeb34 main.run.func2+0x34 github.com/FerretDB/FerretDB/cmd/ferretdb/main.go:440 1 @ 0x490fca 0x44fb77 0x4901c5 0x50da27 0x5124bd 0x5124ab 0x5bc009 0x5d343b 0x5d2750 0x13a3b8f 0x13a578a 0x498401 # 0x4901c4 internal/poll.runtime_pollWait+0x84 runtime/netpoll.go:351 # 0x50da26 internal/poll.(*pollDesc).wait+0x26 internal/poll/fd_poll_runtime.go:84 # 0x5124bc internal/poll.(*pollDesc).waitRead+0x27c internal/poll/fd_poll_runtime.go:89 # 0x5124aa internal/poll.(*FD).Accept+0x26a internal/poll/fd_unix.go:618 # 0x5bc008 net.(*netFD).accept+0x28 net/fd_unix.go:149 # 0x5d343a net.(*TCPListener).accept+0x1a net/tcpsock_posix.go:159 # 0x5d274f net.(*TCPListener).Accept+0x2f net/tcpsock.go:387 # 0x13a3b8e github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop+0x6e github.com/FerretDB/FerretDB/internal/clientconn/listener.go:224 # 0x13a5789 github.com/FerretDB/FerretDB/internal/clientconn.(*Listener).Run.func1+0x69 github.com/FerretDB/FerretDB/internal/clientconn/listener.go:166 1 @ 0x490fca 0x44fb77 0x4901c5 0x50da27 0x5124bd 0x5124ab 0x5bc009 0x5d343b 0x5d2750 0xb03559 0x14e8caa 0x498401 # 0x4901c4 internal/poll.runtime_pollWait+0x84 runtime/netpoll.go:351 # 0x50da26 internal/poll.(*pollDesc).wait+0x26 internal/poll/fd_poll_runtime.go:84 # 0x5124bc internal/poll.(*pollDesc).waitRead+0x27c internal/poll/fd_poll_runtime.go:89 # 0x5124aa internal/poll.(*FD).Accept+0x26a internal/poll/fd_unix.go:618 # 0x5bc008 net.(*netFD).accept+0x28 net/fd_unix.go:149 # 0x5d343a net.(*TCPListener).accept+0x1a net/tcpsock_posix.go:159 # 0x5d274f net.(*TCPListener).Accept+0x2f net/tcpsock.go:387 # 0xb03558 net/http.(*Server).Serve+0x378 net/http/server.go:3574 # 0x14e8ca9 github.com/FerretDB/FerretDB/internal/util/debug.(*Handler).Serve.func2+0x49 github.com/FerretDB/FerretDB/internal/util/debug/debug.go:319 1 @ 0x490fca 0x469137 0x10c8751 0x498401 # 0x10c8750 github.com/FerretDB/FerretDB/internal/clientconn/cursor.(*Registry).NewCursor.func1+0xb0 github.com/FerretDB/FerretDB/internal/clientconn/cursor/registry.go:159 1 @ 0x490fca 0x469137 0x1210b5a 0x12550a9 0x498401 # 0x1210b59 github.com/FerretDB/FerretDB/internal/handler.(*Handler).runCappedCleanup+0x1d9 github.com/FerretDB/FerretDB/internal/handler/handler.go:424 # 0x12550a8 github.com/FerretDB/FerretDB/internal/handler.New.func1+0x48 github.com/FerretDB/FerretDB/internal/handler/handler.go:231 1 @ 0x490fca 0x469137 0x1210eda 0x1254fe9 0x498401 # 0x1210ed9 github.com/FerretDB/FerretDB/internal/handler.(*Handler).runTTLCleanup+0x1d9 github.com/FerretDB/FerretDB/internal/handler/handler.go:450 # 0x1254fe8 github.com/FerretDB/FerretDB/internal/handler.New.func2+0x48 github.com/FerretDB/FerretDB/internal/handler/handler.go:239 1 @ 0x490fca 0x469137 0x123db96 0x123c096 0x1254ce2 0x13a2c30 0x13a227a 0x13a1205 0x13a5dff 0x498401 # 0x123db95 github.com/FerretDB/FerretDB/internal/handler.(*Handler).awaitData+0x3b5 github.com/FerretDB/FerretDB/internal/handler/msg_getmore.go:394 # 0x123c095 github.com/FerretDB/FerretDB/internal/handler.(*Handler).MsgGetMore+0x1235 github.com/FerretDB/FerretDB/internal/handler/msg_getmore.go:252 # 0x1254ce1 github.com/FerretDB/FerretDB/internal/handler.(*Handler).initCommands.func2+0x61 github.com/FerretDB/FerretDB/internal/handler/commands.go:369 # 0x13a2c2f github.com/FerretDB/FerretDB/internal/clientconn.(*conn).handleOpMsg+0x6f github.com/FerretDB/FerretDB/internal/clientconn/conn.go:583 # 0x13a2279 github.com/FerretDB/FerretDB/internal/clientconn.(*conn).route+0x6d9 github.com/FerretDB/FerretDB/internal/clientconn/conn.go:436 # 0x13a1204 github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run+0xde4 github.com/FerretDB/FerretDB/internal/clientconn/conn.go:286 # 0x13a5dfe github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1+0x57e github.com/FerretDB/FerretDB/internal/clientconn/listener.go:294 1 @ 0x490fca 0x469137 0x1253986 0x1254f29 0x498401 # 0x1253985 github.com/FerretDB/FerretDB/internal/handler.(*Handler).runSelfRegulation+0x265 github.com/FerretDB/FerretDB/internal/handler/selfregulate.go:224 # 0x1254f28 github.com/FerretDB/FerretDB/internal/handler.New.func3+0x48 github.com/FerretDB/FerretDB/internal/handler/handler.go:247 1 @ 0x490fca 0x469137 0x14d2ea7 0x498401 # 0x14d2ea6 github.com/arl/statsviz.(*Server).init.func1+0x126 github.com/arl/statsviz@v0.8.2/statsviz.go:147 1 @ 0x490fca 0x469137 0x59f4dc 0x498401 # 0x59f4db os/signal.NotifyContext.func1+0x7b os/signal/signal.go:304 1 @ 0xb6c272 0xb6b009 0xb69349 0x14b7054 0x14b7a9c 0xafffc9 0xb01baf 0xb2410e 0xafe2fc 0x498401 # 0xb6c271 runtime/pprof.writeHeapInternal+0x1231 runtime/pprof/pprof.go:628 # 0xb6b008 runtime/pprof.writeAlloc+0x28 runtime/pprof/pprof.go:625 # 0xb69348 runtime/pprof.(*Profile).WriteTo+0x148 runtime/pprof/pprof.go:405 # 0x14b7053 net/http/pprof.handler.ServeHTTP+0x553 net/http/pprof/pprof.go:272 # 0x14b7a9b net/http/pprof.Index+0xdb net/http/pprof/pprof.go:391 # 0xafffc8 net/http.HandlerFunc.ServeHTTP+0x28 net/http/server.go:2358 # 0xb01bae net/http.(*ServeMux).ServeHTTP+0x1ce net/http/server.go:2923 # 0xb2410d net/http.serverHandler.ServeHTTP+0x8d net/http/server.go:3436 # 0xafe2fb net/http.(*conn).serve+0x6db net/http/server.go:2157