请教 ImageMagick 裁切图片报错 libgomp: Thread creation failed: Resource temporarily unavailable

2014-06-06 02:19:48 +08:00
 hopestar86
如题,
百度 google了 各种方面,还是搞不定

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

批量裁切大量图片 N万张

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

请教怎么解决?
4973 次点击
所在节点    Linux
3 条回复
Livid
2014-06-06 03:29:02 +08:00
看起来像是 ulimit 的某个限制被触及了。
riaqn
2014-06-06 09:52:20 +08:00
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.
riaqn
2014-06-06 09:57:17 +08:00
另外,为什么不用graphicsmagick呢,是imagemagick的fork。
http://www.graphicsmagick.org/
比im高到不知道哪里去了……

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/116035

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX