前阵子做得那个系统发布了,结果刚放到服务器上就出了 outOfMemery 错误。 查看发现是由于下的进程导致的:

Daemon Thread [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] (Running)

经过查找,发现在datasource里把c3p0的numHelperThreads设成了1000。正是由于这个线程过多导致了内存溢出,改成10就没有问题了。附上c3p0里对于 numHelperThreads的描述:

numHelperThreads
  Default: 3
c3p0 is very asynchronous. Slow JDBC operations are generally performed by helper threads that don't hold contended locks. Spreading these operations over multiple threads can significantly improve performance by allowing multiple operations to be performed simultaneously.

默认值:3

c3p0是异步的 ,JDBC操作通常是被不持有锁的 helper线程执行的,允许多线程操作能够改进性能。

readable angular tests

In this post, I'll provdes some tips to create readable angular test.### General Tips#### Use describe or nested describe to structure sp...… Continue reading

Exposing event stream from monolith

Published on September 18, 2017