`

Could not get a resource from the pool

阅读更多
出现这次错误,看网上修改

config.setMaxTotal(60000);//设置最大连接数 
        config.setMaxIdle(1000); //设置最大空闲数
        config.setMaxWaitMillis(3000);//设置超时时间 

修改了还是不管用,

redis.conf 下面也没有maxclients这个参数,默认无限制,进程可以打开的最大文件描述符数。

设置同一时间最大客户端连接数,默认无限制,Redis可以同时打开的客户端连接数为Redis进程可以打开的最大文件描述符数,如果设置 maxclients 0,表示不作限制。当客户端连接数到达限制时,Redis会关闭新的连接并向客户端返回max number of clients reached错误信息
    maxclients 128

看了一下 nlimit -a open files太小,调一下解决问题
分享到:
评论

相关推荐

    分布式实现redis锁 出现错误Could not get a resource from the pool

    NULL 博文链接:https://sichen84.iteye.com/blog/2419876

    Redis 的高并发实战:抢购系统 1

    当引擎层出现慢查询时,响应时间会延长,可能导致连接池耗尽,引发“Could not get a resource from the pool”的异常。 Redis 协议本身不支持连接收敛,消息没有 ID,使得请求和响应关联困难,类似于 HTTP 1.x。...

    Redis的开发规范和常见问题1

    如果因慢查询导致连接返回延迟,连接池可能会耗尽,引发“Could not get a resource from the pool”的错误。 - **资源规划**:特别是在大规模部署中,需要合理规划每个客户端的最大连接数,以避免达到系统的连接...

    a project model for the FreeBSD Project.7z

    This, combined with the vast amount of dependencies in the kernel and that it is not easy to see all the consequences of a kernel change, demands developers with a relative full understanding of the ...

    微软内部资料-SQL性能优化3

    SIX locks imply that we have shared access to a resource and we have also placed X locks at a lower level in the hierarchy. SQL Server never asks for SIX locks directly, they are always the result of ...

    Codis jar包修改过RoundRobinJedisPool代码的for循环

    系统使用了codis之后,发现当并发量上来之后,会抛出异常:could not get resource from pool,更底层的原因是:Timeout waiting for idle object 修改了RoundRobinJedisPool代码将for循环内部的代码控制到原子 jar...

    delphi 7 gif控件

    // so that a colour get converted to the precise colour if that colour is // // present in the palette when using ColorReduction rmQuantize. // // // // Changed 2003-03-09 by Finn Tolderlund: // // ...

    php.ini-development

    The directory from the --with-config-file-path compile time option, or the ; Windows directory (C:\windows or C:\winnt) ; See the PHP docs for more specific information. ; ...

    SSH整合项目中容易出现的错误

    4. 严重: Error starting static Resources java.lang.IllegalArgumentException: Document base D:/Program Files/Apache SoftwareFoundation/Tomcat 5.0/webapps/tomcat-docs does not exist or is not a readable...

    虚拟网卡驱动源代码(原版)

    * should list that the code comes from the book "Linux Device * Drivers" by Alessandro Rubini and Jonathan Corbet, published * by O'Reilly & Associates. No warranty is attached; * we cannot take ...

    ImageApplication:基于Glide4.0.0RC1 BitmapTransformation给图片加上各类圆角,并提供将四小图合成大图

    // TODO this could be acquired from the pool too Bitmap squared = Bitmap.createBitmap(source, x, y, size, size); Bitmap result = pool.get(size, size, Bitmap.Config.ARGB_8888); if (result == null)...

Global site tag (gtag.js) - Google Analytics