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

查询数据时不时报超时 #295

Open
ClownSketch opened this issue Jun 16, 2023 · 3 comments
Open

查询数据时不时报超时 #295

ClownSketch opened this issue Jun 16, 2023 · 3 comments
Labels
question Further information is requested

Comments

@ClownSketch
Copy link

connection(127.0.0.1:27017[-23]) incomplete read of message header: read tcp 127.0.0.1:63405->127.0.0.1:27017: i/o timeout

在数据只有十万条左右的时候还正常,现在数据有20多万条,查询数据会时不时报链接超时,mongo没问题,设置查询超时也没用

@jiangz222
Copy link
Collaborator

你这样提问题并不能帮助问题的解决,可能需要提供更多线索,或者讲一下你当前的排查思路

@jiangz222 jiangz222 added the question Further information is requested label Jun 18, 2023
@ClownSketch
Copy link
Author

现在没有其他异常出现,err只提示了链接超时,问题出现的时间是集合的数据超过15万条左右时出现的,这个问题时偶发性,没办法排查到具体原因

这是查询语句
cli := mongo_factory.GetCollection(variable.MongoClient, table)
err := cli.Find(ctx, m.Filter).Skip(m.Skit).Limit(m.Limit).Select(m.SelectCols).Sort(m.OrderBy()...).All(result)

@cupen
Copy link

cupen commented Feb 29, 2024

@gi-clown 搞定没? 实在不行就掏钱吧,一小时一顿盖饭,会有人帮你的。:laughing:

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

No branches or pull requests

3 participants