circusctl incr <name> [<nbprocess>] does not increment by nbprocess - circusd

Here is my circus.ini
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
stats_endpoint = tcp://127.0.0.1:5557
httpd = False
debug = False
[watcher:sample1]
cmd = /worker/sample1.php
warmup_delay = 0
numprocesses = 10
[watcher:sample2]
cmd = /worker/sample2.php
warmup_delay = 0
numprocesses = 10
[plugin:flapping]
use = circus.plugins.flapping.Flapping
retry_in = 3
max_retry = 2
I am trying to increase the number of processes by 2(nbprocess) for sample1. I tried
circusctl incr sample1 2
But circus always increases it by 1, not by 2(nbprocess). Any ideas?

Fixed by the author. Here is the reported bug.

Related

SIGABRT "The following Metal object is being destroyed while still required to be alive by the command buffer" in macCatalyst randomly

I have macCatalyst app that recently gets some random crashes. Searched everywhere but without finding any good leads. My guess is that it's related to memory or too many views visible on the screen. I do not get a good stack trace, but this it what's showing in the log:
-[MTLDebugDevice notifyExternalReferencesNonZeroOnDealloc:]:2951: failed assertion `The following Metal object is being destroyed while still required to be alive by the command buffer 0x7f8cd811c600 (label: <no label set>):
<MTLToolsObject: 0x7f8b0f9e3d60> -> <MTLIGAccelTexture: 0x7f8cd8566a00>
label = CAMetalLayer Drawable
textureType = MTLTextureType2D
pixelFormat = MTLPixelFormatBGRA8Unorm_sRGB
width = 772
height = 1372
depth = 1
arrayLength = 1
mipmapLevelCount = 1
sampleCount = 1
cpuCacheMode = MTLCPUCacheModeDefaultCache
storageMode = MTLStorageModeManaged
hazardTrackingMode = MTLHazardTrackingModeTracked
resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModeManaged MTLResourceHazardTrackingModeTracked
usage = MTLTextureUsageShaderRead MTLTextureUsageShaderWrite MTLTextureUsageRenderTarget MTLTextureUsagePixelFormatView
shareable = 0
framebufferOnly = 0
purgeableState = MTLPurgeableStateNonVolatile
swizzle = [MTLTextureSwizzleRed, MTLTextureSwizzleGreen, MTLTextureSwizzleBlue, MTLTextureSwizzleAlpha]
isCompressed = 0
parentTexture = <null>
parentRelativeLevel = 0
parentRelativeSlice = 0
buffer = <null>
bufferOffset = 0
bufferBytesPerRow = 0
iosurface = 0x600002533060
iosurfacePlane = 0
allowGPUOptimizedContents = YES'
-[MTLDebugDevice notifyExternalReferencesNonZeroOnDealloc:]:2951: failed assertion `The following Metal object is being destroyed while still required to be alive by the command buffer 0x7f8cd811c600 (label: <no label set>):
<MTLToolsObject: 0x7f8b0f9e3d60> -> <MTLIGAccelTexture: 0x7f8cd8566a00>
label = CAMetalLayer Drawable
textureType = MTLTextureType2D
pixelFormat = MTLPixelFormatBGRA8Unorm_sRGB
width = 772
height = 1372
depth = 1
arrayLength = 1
mipmapLevelCount = 1
sampleCount = 1
cpuCacheMode = MTLCPUCacheModeDefaultCache
storageMode = MTLStorageModeManaged
hazardTrackingMode = MTLHazardTrackingModeTracked
resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModeManaged MTLResourceHazardTrackingModeTracked
usage = MTLTextureUsageShaderRead MTLTextureUsageShaderWrite MTLTextureUsageRenderTarget MTLTextureUsagePixelFormatView
shareable = 0
framebufferOnly = 0
purgeableState = MTLPurgeableStateNonVolatile
swizzle = [MTLTextureSwizzleRed, MTLTextureSwizzleGreen, MTLTextureSwizzleBlue, MTLTextureSwizzleAlpha]
isCompressed = 0
parentTexture = <null>
parentRelativeLevel = 0
parentRelativeSlice = 0
buffer = <null>
bufferOffset = 0
bufferBytesPerRow = 0
iosurface = 0x600002533060
iosurfacePlane = 0
allowGPUOptimizedContents = YES'
I'm running on a Intel Mac mini with 32Gb memory. It often crashes often when showing a MapView on screen. But also in some other cases.
Edit: Could be related to programatically zooming in animated in a MapView on MacCatalyst. A workaround is for now to disable the animation. Will research more.

magento2 cron not reindex

I have created a crontab with this command in my Ubuntu Server and Plesk 12.5 :
MAILTO=""
SHELL="/bin/bash"
*/1 * * * * php -c -f /var/www/vhosts/system/domainname.com/etc/php.ini /var/www/vhosts/domainname.com/httpdocs/store/bin/magento cron:run > /var/www/vhosts/domainname.com/httpdocs/store/var/log/magento.cron.log&
MAILTO=""
SHELL="/bin/bash"
*/1 * * * * php -c -f /var/www/vhosts/system/domainname.com/etc/php.ini /var/www/vhosts/domainname.com/httpdocs/store/update/cron.php > /var/www/vhosts/domainname.com/httpdocs/store/var/log/update.cron.log&
MAILTO=""
SHELL="/bin/bash"
*/1 * * * * php -c -f /var/www/vhosts/system/domainname.com/etc/php.ini /var/www/vhosts/domainname.com/httpdocs/store/bin/magento setup:cron:run > /var/www/vhosts/domainname.com/httpdocs/store/var/log/setup.cron.log&
When run it creates three files (magento.cron.log; update.cron.log; setup.cron.log). And three files cotains the same text:
; ATTENTION! ; ; DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED
AUTOMATICALLY, ; SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE
FILE IS GENERATED.
[PHP] soap.wsdl_cache_limit = 5 cli_server.color = On
mysql.allow_persistent = On mysqli.max_persistent = -1
mysql.connect_timeout = 60 session.use_only_cookies = 1
register_argc_argv = Off mssql.min_error_severity = 10 open_basedir =
"/var/www/vhosts/mydomainname.com/:/tmp/" session.name = PHPSESSID
mysqlnd.collect_statistics = On session.hash_function = 0
session.gc_probability = 0 log_errors_max_len = 1024
mssql.secure_connection = Off pgsql.max_links = -1 variables_order =
"GPCS" ldap.max_links = -1 sybct.allow_persistent = On max_input_time
= 60 odbc.max_links = -1 session.save_handler = files session.save_path = "/var/lib/php5" mysqli.cache_size = 2000
pgsql.auto_reset_persistent = Off error_reporting = E_ALL &
~E_DEPRECATED & ~E_STRICT auto_prepend_file =
sybct.min_client_severity = 10 pgsql.max_persistent = -1
auto_globals_jit = On soap.wsdl_cache_ttl = 86400 allow_url_fopen = On
zend.enable_gc = On mysqli.allow_persistent = On tidy.clean_output =
Off display_startup_errors = Off user_dir = session.cookie_lifetime =
0 mysqli.max_links = -1 default_socket_timeout = 60
session.serialize_handler = php session.hash_bits_per_character = 5
unserialize_callback_func = pdo_mysql.cache_size = 2000
default_mimetype = "text/html" session.cache_expire = 180
max_execution_time = 30 mail.add_x_header = On upload_max_filesize =
2M ibase.max_links = -1 zlib.output_compression = Off
ignore_repeated_errors = Off odbc.max_persistent = -1 file_uploads =
On ibase.max_persistent = -1 mysqli.reconnect = Off
mssql.allow_persistent = On mysql.max_persistent = -1 mssql.max_links
= -1 session.use_trans_sid = 0 mysql.default_socket = always_populate_raw_post_data = -1 mysql.max_links = -1
odbc.defaultbinmode = 1 sybct.max_persistent = -1 output_buffering =
4096 ibase.timeformat = "%H:%M:%S" doc_root = log_errors = On
mysql.default_host = default_charset = "UTF-8" request_order = "GP"
display_errors = Off mysqli.default_socket = mysqli.default_pw =
html_errors = On mssql.compatibility_mode = Off ibase.allow_persistent
= 1 sybct.min_server_severity = 10 mysql.allow_local_infile = On post_max_size = 8M asp_tags = Off memory_limit = 512M short_open_tag =
Off SMTP = localhost precision = 14 session.use_strict_mode = 0
session.gc_maxlifetime = 1440 allow_url_include = Off
mysqli.default_host = mysqli.default_user = session.referer_check =
pgsql.log_notice = 0 mysql.default_port = pgsql.ignore_notice = 0
mysql.trace_mode = Off ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
engine = On odbc.allow_persistent = On ibase.dateformat = "%Y-%m-%d"
track_errors = Off max_file_uploads = 20 pgsql.allow_persistent = On
session.auto_start = 0 auto_append_file = disable_classes =
pdo_mysql.default_socket = mysql.default_password =
url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=fakeentry" smtp_port = 25
sql.safe_mode = Off session.cookie_path = / expose_php = On
report_memleaks = On session.gc_divisor = 1000 mssql.max_persistent =
-1 serialize_precision = 17 odbc.check_persistent = On sybct.max_links = -1 mysqlnd.collect_memory_statistics = Off session.cookie_domain = session.cookie_httponly = session.cache_limiter = nocache enable_dl =
Off mysqli.default_port = 3306 disable_functions = odbc.defaultlrl =
4096 soap.wsdl_cache_enabled = 1 soap.wsdl_cache_dir = "/tmp"
mssql.min_message_severity = 10 session.use_cookies = 1
mysql.default_user = mysql.cache_size = 2000 implicit_flush = Off
ignore_repeated_source = Off bcmath.scale = 0
But when I enter magenta manager keeps giving the message "One or more indexers are invalid. Make sure your Magento cron job is running."
I do not understand. What Is It that is not working?
Thanks
You have gotten the flags for php wrong. It should be
*/1 * * * * php -c /var/www/vhosts/system/domainname.com/etc/php.ini -f /var/www/vhosts/domainname.com/httpdocs/store/bin/magento cron:run > /var/www/vhosts/domainname.com/httpdocs/store/var/log/magento.cron.log&
Also provide full path to php, which can be figured out with which php command.

Sorting lines alphabetically in Eclipse PyDev

I have a Python class:
class PatientParamStruct:
output_folder = ''
condition_timestamps = None # list cannot be initialized here!
lag_time = 0
lead_time = 0
feature_numbers = None
input_feature_folder = ''
input_folder_validation = ''
patient_number = 0
lag_number_of_windows = 0
samples_per_second = 0
prediction_window = 0
moving_window_time = 0
subwindow_lag_time = 0
Can I sort alphabetically a bunch of lines in Eclipse PyDev?
In this case the output would be:
class PatientParamStruct:
condition_timestamps = None # list cannot be initialized here!
feature_numbers = None
input_feature_folder = ''
input_folder_validation = ''
lag_number_of_windows = 0
lag_time = 0
lead_time = 0
moving_window_time = 0
output_folder = ''
patient_number = 0
prediction_window = 0
samples_per_second = 0
subwindow_lag_time = 0
Yes, you can use:
Ctrl+Shift+O
It's the same binding used for the organize imports, but if some text is selected it'll sort the text (and if no text is selected it'll organize imports and try to add new imports for unresolved tokens).

Creating an array of a specific size from data in an array of a larger size - averages

I want to find the average value across an array between the element(x) and element(x+1)
for val = 1: xMid_p-1
eapDia_p = diaArray_p(1,val);
baseDia_p = diaArray_p(1,end);
curDiaArray_p = linspace(eapDia_p, baseDia_p, xMid_p-1);
curRadArray_p = curDiaArray_p/2;
maxRad = max(curRadArray_p);
for val = 1 : xMid_p-1
ln(1,val) = maxRad(:) - curRadArray_p(val);
lnE(1,val) = ln(1,val).^3;
presAn(1,val)= acos(((refDia_p/2)*cos(refPresAng_p))./curRadArray_p(val));
arcToo(1,val) = 2 * curRadArray_p(val)*((twRefDia_p/refDia_p)+(tan(refPresAng_p)-refPresAng_p)-(tan(presAn(1,val))-presAn(1,val)));
chor(1,val) = 2 * curRadArray_p(val) * sin(arcToo(1,val)/(curRadArray_p(1,val)*2));
for val = 1 : xMid_p - 2
lnM(1,val) = maxRad(:) - curRadArray_p(val);
lnME(1,val)=lnM(1,val).^3;
end
end
lnCubed(1,:) = ln.^3;
lnMCubed(1,:) = lnM.^3;
lnEq = lnCubed(2:end) - lnMCubed;
end
please see chor(1,val), this would give the value :
chor =
1 2 3 4 5 6 7 8
I want to find the average chor, therefore the array will be one element smaller in size and will give the result
aveChor =
1.5 2.5 3.5 4.5 5.5 6.5 7.5
One approach using indexing -
aveChor = (chor(2:end) + [chor(1:end-1)])/2
Another approach using diff -
aveChor = (2*chor(1:end-1) + diff(chor))/2

why my celeryd take high cpu after it started a couple of days?

when i start celeryd and run it for two or three days, it always take very high cpu(about 100%) every time.
and at the same time, tasks are processed very slow(20-30 seconds).
here is my celeryconfig.py:
BROKER_URL = "mongodb://mongodb_server:27017/celery"
CELERY_RESULT_BACKEND = "mongodb"
CELERY_IMPORTS = ("cate.tasks",)
CELERY_SEND_TASK_ERROR_EMAILS = True
ADMINS = (
("...", "..."),
)
SERVER_EMAIL = "dev-no-reply#ele.me"
#ETA_CELERY_PRECISION = 0.1
#CELERY_DISABLE_RATE_LIMIT = True
CELERY_MAX_TASKS_PER_CHILD = 1
CELERY_IGNORE_RESULT = True
CELERYD_PREFETCH_MULTIPLIER = 1
#CELERYD_FORCE_EXECV = True
CELERY_SEND_EVENTS = True
#CELERY_ENABLE_UTC = True
#CELERY_TIMEZONE = "Asia/Shanghai"
CELERY_ROUTES = {"cate.tasks.push_ios_message": {"queue": "push_ios_message"}}