GithubHelp home page GithubHelp logo

会遗漏请求 about jqhttpserver HOT 12 CLOSED

Robin528919 avatar Robin528919 commented on July 23, 2024
会遗漏请求

from jqhttpserver.

Comments (12)

188080501 avatar 188080501 commented on July 23, 2024

请描述下具体的测试方法

from jqhttpserver.

Robin528919 avatar Robin528919 commented on July 23, 2024

tcpServerManage.setHttpAcceptedCallback(std::bind(&MainWindows::onHttpAccepted, this, std::placeholders::_1)); const auto listenSucceed = tcpServerManage.listen(QHostAddress::Any, 8888); __Debug << "http服务器启动" << listenSucceed; if (!listenSucceed) { QMessageBox::warning(this, "错误提示", "微型服务器启动失败!"); }
这是我的启动代码

image

from jqhttpserver.

Robin528919 avatar Robin528919 commented on July 23, 2024

我通过api 连续的post请求 期间把所有的请求输出到日志内 我的请求会加入标识 1-50 。中间会遗漏部分。

from jqhttpserver.

Robin528919 avatar Robin528919 commented on July 23, 2024

经过测试 确定问题出在了 线程pool。我私有化的有一个pool 你也用的pool 我在向我的pool里面添加任务以后,就会出现消息遗漏情况。而且很严重。

from jqhttpserver.

188080501 avatar 188080501 commented on July 23, 2024

请提供下能复现的完整代码
包括请求部分

from jqhttpserver.

Robin528919 avatar Robin528919 commented on July 23, 2024

您可以进行一个简单的测试,启动一个服务器,再私有一个 pool 然后进行连续的网路请求,最好带有序号的请求,这样更方便的确定是否遗漏。我已经更换别的httpServer。代码已经删除,已经不方便提供了。我的httpServer非静态,而是在MainWindows内实例化的一个

from jqhttpserver.

188080501 avatar 188080501 commented on July 23, 2024

因为目前不确定你说的私有pool具体是什么,并且我这里找了几个测试场景都无法复现,暂时关闭此问题。
若可以提供完整复现代码,证明是JQHttpServer问题(Qt问题不算),我可以提供相关费用以感谢问题的查找。

from jqhttpserver.

daabtech avatar daabtech commented on July 23, 2024

from jqhttpserver.

Robin528919 avatar Robin528919 commented on July 23, 2024

threadPool 导致的

from jqhttpserver.

188080501 avatar 188080501 commented on July 23, 2024

Qt的threadpool性能较差,但是不应该存在丢数据的情况。
还有一个情况就是如果你qps特别高,到几千或者上万的时候,会丢请求,这是因为这个已经超过select的处理能力了

from jqhttpserver.

Robin528919 avatar Robin528919 commented on July 23, 2024

没那么大的数据量,手动测试1-50。期间丢请求

from jqhttpserver.

daabtech avatar daabtech commented on July 23, 2024

from jqhttpserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.