alibaba / alibaba/druid

首次访问慢

Open
#3,963 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
28.2k
Forks
8.6k
PR merge metrics
No merged PRs in 30d

Description

spring+druid,配置init-method="getConnection",系统启动成功后,首次执行Insert操作非常慢,耗时50毫秒,第二次Insert操作恢复正常10毫秒以内。每个docker都是启动成功后第一次慢,第二次访问数据库就正常了。

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. First reproduce the slow first Insert after startup with Spring, Druid configured with init-method="getConnection", and Docker, then compare it with the second Insert and trace the connection initialization path; done means identifying and resolving the startup-only delay while preserving normal subsequent Insert timing.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, spring
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.