技术解析

请教 ImageMagick 裁切图片报错 libgomp: Thread creation failed: Resource temporarily unavailable
0
2021-07-16 17:40:17
idczone
如题,
百度 google了 各种方面,还是搞不定

find ./ -name '*.jpg' -exec convert -quality 90 -resize "300x300>" {} {} \;

批量裁切大量图片 N万张

我在另一台vps上,裁切就没有问题。

请教怎么解决?
看起来像是 ulimit 的某个限制被触及了。

man pthread_create
EAGAIN Insufficient resources to create another thread, or a system-imposed limit on the number of threads was encountered. The latter case may occur in two ways: the RLIMIT_NPROC soft resource limit (set via setrlimit(2)),which limits the number of process for a real user ID, was reached; or the kernel's system-wide limit on the number of threads, /proc/sys/kernel/threads-max, was reached.

另外,为什么不用graphicsmagick呢,是imagemagick的fork。
http://www.graphicsmagick.org/
比im高到不知道哪里去了……

数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服