Comments (6)
Maybe you need post more infomation in logs so I can find the problem.
Or tell more what's happening when zimg crashed.
from zimg.
在 2014年12月17日,下午11:52,招牌疯子 [email protected] 写道:
Maybe you need post more infomation in logs so I can find the problem.
Or tell more what's happening when zimg crashed.
—
Reply to this email directly or view it on GitHub #55 (comment).hi, “the crazy “
first, sorry to post this to-do at top of your post list, because i did not mention the ’to-do’ post thread at bottom.
I work at a Chinese internet company, when we deploy service online , we usually deploy it as child process of “supervisor”, this could help when binary crash (avoid losing many pv).
refer :http://supervisord.org/ <http://supervisord.org/>
further, when become online service, cdn can help a lot.
love your work , best wishes~
—
tommyzhao=
from zimg.
I have used zimg via supervise in my demo server: http://demo.buaa.us/
So there's no problem.
from zimg.
I tried to add zimg to supervise, but zimg exit quickly. How do you configure the supervisor for zimg?
Thanks.
from zimg.
Use absolute path in your configs and set daemon false.
supervisor config:
[program:zimg]
command=/home/zippo/dev/zimg/bin/zimg /home/zippo/dev/zimg/bin/conf/debug.lua
autorestart=true
user=zippo
zimg config:
is_daemon = 0
log_name = '/home/zippo/dev/zimg/bin/log/zimg.log'
root_path = '/home/zippo/dev/zimg/bin/www/index.html'
admin_path = '/home/zippo/dev/zimg/bin/www/admin.html'
script_name = '/home/zippo/dev/zimg/bin/script/process.lua'
img_path = '/home/zippo/dev/zimg/bin/img'
from zimg.
Thanks. It still got crash when upload image at the same time. So I duplicate the zimg.lua with different tcp port.
das@ubuntu:/etc/supervisor/conf.d$ cat app.conf
[program:zimg]
command=/opt/zimg/bin/zimg /opt/zimg/bin/conf/zimg.lua
directory=/opt/zimg/bin
autorestart=true
user=root
[program:zimg2]
command=/opt/zimg/bin/zimg /opt/zimg/bin/conf/zimg2.lua
directory=/opt/zimg/bin
autorestart=true
user=root
[program:zimg3]
command=/opt/zimg/bin/zimg /opt/zimg/bin/conf/zimg3.lua
directory=/opt/zimg/bin
autorestart=true
user=root
[program:zimg4]
command=/opt/zimg/bin/zimg /opt/zimg/bin/conf/zimg4.lua
directory=/opt/zimg/bin
autorestart=true
user=root
So I have 4 zimg running on different tcp port.
root@ubuntu:/etc/supervisor/conf.d# ps -ef | grep zimg
root 1146 1139 0 23:23 ? 00:00:00 /opt/zimg/bin/zimg /opt/zimg/bin/conf/zimg3.lua
root 1147 1139 0 23:23 ? 00:00:00 /opt/zimg/bin/zimg /opt/zimg/bin/conf/zimg2.lua
root 1148 1139 0 23:23 ? 00:00:00 /opt/zimg/bin/zimg /opt/zimg/bin/conf/zimg.lua
root 1149 1139 0 23:23 ? 00:00:00 /opt/zimg/bin/zimg /opt/zimg/bin/conf/zimg4.lua
root 1171 1089 0 23:24 pts/0 00:00:00 grep --color=auto zimg
Nginx for load balance.
from zimg.
Related Issues (20)
- Java操作Zimg返回json数据格式
- 如何返回base64的图片格式?
- 图片显示不完整
- 官网文档里的很多链接都失效了,辛苦维护一下吧
- 怎么删除图片呢 HOT 1
- zimg 进程异常退出,提示内存越界 HOT 2
- how zimg restart after change config?
- PNG image uploaded successfully, but cannot be accessed HOT 1
- 官方文档wget libevent安装cloud.github.com域名无法解析问题
- 各位大佬 能不能把小视频也集成进来?支持图片和视频 HOT 1
- info 接口获取图片信息很慢,请问可以通过什么参数做优化吗 HOT 1
- 基于centos 8.0 及以上 安装 有问题
- make error HOT 2
- 出现大量 Error from accept() call: Too many open files 错误 HOT 1
- [Building error]: /usr/bin/ld: CMakeFiles/zimg.dir/zaccess.c.o:(.bss+0x0): multiple definition of `settings'; CMakeFiles/zimg.dir/main.c.o:(.bss+0x20): first defined here HOT 2
- make error HOT 1
- 请问zimg硬盘写满了会怎么办,会删除历史数据吗 HOT 2
- centos7 需要安装依赖 HOT 1
- 请求图片导致服务异常退出 HOT 1
- using MinIO or AWS S3 API standard compatible components as the optional Storage replacement? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zimg.