{"action":"created","issue":{"url":"https://api.github.com/repos/unbit/uwsgi/issues/58","repository_url":"https://api.github.com/repos/unbit/uwsgi","labels_url":"https://api.github.com/repos/unbit/uwsgi/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/unbit/uwsgi/issues/58/comments","events_url":"https://api.github.com/repos/unbit/uwsgi/issues/58/events","html_url":"https://github.com/unbit/uwsgi/issues/58","id":8587816,"number":58,"title":"timer decorator and cheaped workers","user":{"login":"prymitive","id":114288,"avatar_url":"https://avatars.githubusercontent.com/u/114288?v=3","gravatar_id":"","url":"https://api.github.com/users/prymitive","html_url":"https://github.com/prymitive","followers_url":"https://api.github.com/users/prymitive/followers","following_url":"https://api.github.com/users/prymitive/following{/other_user}","gists_url":"https://api.github.com/users/prymitive/gists{/gist_id}","starred_url":"https://api.github.com/users/prymitive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prymitive/subscriptions","organizations_url":"https://api.github.com/users/prymitive/orgs","repos_url":"https://api.github.com/users/prymitive/repos","events_url":"https://api.github.com/users/prymitive/events{/privacy}","received_events_url":"https://api.github.com/users/prymitive/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":39,"created_at":"2012-11-22T21:35:26Z","updated_at":"2016-12-29T17:09:36Z","closed_at":null,"body":"If I use timer decorator and all my workers will be cheaped than also timer will stop working since it is executed in first worker. Docs say that timer can be executed using spooler instead of worker, but it doesn't say anything about cheaping workers with --idle option.\nThis should be either:\n1. documented - so that users will be warned (provided that they will read docs) and maybe print big fat warning that using --idle with timer signal (and possibly other) does not mix\n2. disable --idle when signals are used - since user wants to  handle some signals and we need worker to do so it's better to disable one minor feature than to break other that is potentially important\n3. fix it in some other way\n\ntimerapp.ini:\n\n```\n[uwsgi]\nautoload = true\nplugins-dir = /usr/lib/uwsgi/plugins\nplugins = python\nsocket = :0\nmaster = true\nuid = nobody\ngid = nogroup\nprocesses = 1\nwsgi-file = timerapp.py\nidle = 5\n```\n\ntimerapp.py:\n\n```\nimport uwsgi\nfrom uwsgidecorators import rbtimer\n\n\n@rbtimer(1)\ndef timer(sig):\n    print('Ping!')\n\n\ndef application(env, start_response):\n    start_response('200 OK', [('Content-Type','text/html')])\n    return 'uWSGI is alive!'\n```\n\napp log:\n\n```\n[uWSGI] getting INI configuration from timerapp.ini\n*** Starting uWSGI 1.4.1 (64bit) on [Thu Nov 22 22:23:06 2012] ***\ncompiled with version: 4.4.3 on 13 November 2012 09:26:57\nos: Linux-3.0.0-27-virtual #44~lucid1-Ubuntu SMP Fri Oct 19 16:05:20 UTC 2012\nnodename: sudoku-dev-backend1\nmachine: x86_64\nclock source: unix\npcre jit disabled\ndetected number of CPU cores: 4\ncurrent working directory: /home/app\ndetected binary path: /usr/bin/uwsgi\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1024\nlock engine: pthread robust mutexes\nuwsgi socket 0 bound to TCP address :26411 (port auto-assigned) fd 3\nPython version: 2.6.5 (r265:79063, Oct  1 2012, 22:16:31)  [GCC 4.4.3]\n*** Python threads support is disabled. You can enable it with --enable-threads ***\nPython main interpreter initialized at 0x1b6f5d0\nyour server socket listen backlog is limited to 100 connections\nmapped 144784 bytes (141 KB) for 1 cores\n*** Operational MODE: single process ***\n[uwsgi-signal] signum 0 registered (wid: 0 modifier1: 0 target: default, any worker)\nWSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1b6f5d0 pid: 9480 (default app)\n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI master process (pid: 9480)\nspawned uWSGI worker 1 (pid: 9481, cores: 1)\nPing!\nPing!\nPing!\nPing!\nPing!\nPing!\nworkers have been inactive for more than 5 seconds (1353619393-1353619387)\ncheap mode enabled: waiting for socket connection...\n```\n"},"comment":{"url":"https://api.github.com/repos/unbit/uwsgi/issues/comments/269660981","html_url":"https://github.com/unbit/uwsgi/issues/58#issuecomment-269660981","issue_url":"https://api.github.com/repos/unbit/uwsgi/issues/58","id":269660981,"user":{"login":"jsivak","id":251759,"avatar_url":"https://avatars.githubusercontent.com/u/251759?v=3","gravatar_id":"","url":"https://api.github.com/users/jsivak","html_url":"https://github.com/jsivak","followers_url":"https://api.github.com/users/jsivak/followers","following_url":"https://api.github.com/users/jsivak/following{/other_user}","gists_url":"https://api.github.com/users/jsivak/gists{/gist_id}","starred_url":"https://api.github.com/users/jsivak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsivak/subscriptions","organizations_url":"https://api.github.com/users/jsivak/orgs","repos_url":"https://api.github.com/users/jsivak/repos","events_url":"https://api.github.com/users/jsivak/events{/privacy}","received_events_url":"https://api.github.com/users/jsivak/received_events","type":"User","site_admin":false},"created_at":"2016-12-29T17:09:36Z","updated_at":"2016-12-29T17:09:36Z","body":"Just got bit with this issue on one of my older apps (running uwsgi 2.0.8)..  Did any resolution for this issue get decided on or implemented in a newer version?\r\n\r\nThanks"}}
{"actor":{"display_login":"jsivak"}}