当我尝试运行clock
进程时,我一直遇到此错误。
这是我的Procfile
web: gunicorn app:app --log-level debug
worker: python worker.py
clock: python clock.py
当我列出我的dynos heroku ps
时,我得到了:
Free dyno hours quota remaining this month: 943h 3m (94%)
For more information on dyno sleeping and how to upgrade, see:
https://devcenter.heroku.com/articles/dyno-sleeping
=== web (Free): gunicorn app:app --log-level debug (1)
web.1: up 2017/09/26 11:34:20 -0400 (~ 3m ago)
=== worker (Free): python worker.py (1)
worker.1: up 2017/09/26 11:34:18 -0400 (~ 3m ago)
然后我去跑heroku ps:scale clock=1
它以Cannot run more than 2 Free size dynos
我尝试重新启动停止所有dyno,然后再次缩放它们:
(env) spitfiredd@spitfiredd ~/Documents/schedule $ heroku ps:stop web.1
Stopping web.1 dyno on ⬢ fpds-scheduler... done
(env) spitfiredd@spitfiredd ~/Documents/schedule $ heroku ps:stop worker.1
Stopping worker.1 dyno on ⬢ fpds-scheduler... done
(env) spitfiredd@spitfiredd ~/Documents/schedule $ heroku ps:scale web=1
Scaling dynos... done, now running web at 1:Free
(env) spitfiredd@spitfiredd ~/Documents/schedule $ heroku ps:scale worker=1
Scaling dynos... done, now running worker at 1:Free
(env) spitfiredd@spitfiredd ~/Documents/schedule $ heroku ps:scale clock=1
Scaling dynos... !
▸ Cannot run more than 2 Free size dynos.
我做错了什么?
答案 0 :(得分:0)
解决方案:从Free升级到Hobby层。
答案 1 :(得分:0)
获取您的应用名称,并使用以下命令获取dyno进程号
import random
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy.stats import linregress
N = 20
# N = 10 # Set signal sample length
t1 = -np.pi # Simulation begins at t1
t2 = np.pi; # Simulation ends at t2
in_array = np.linspace(t1, t2, N)
# add some noise
noise_input = random.uniform(-.5, .5);
in_array[random.randint(0, len(in_array)-1)] = noise_input
# apply filter on time array
in_array_x = range(0, len(in_array))
slope, intercept, r_val, p_val, std_err = linregress(in_array_x, in_array)
in_array = intercept + slope * in_array_x
# generate sine wave
out_array = np.sin(in_array)
print("OUT ARRAY")
print(out_array)
plt.plot(in_array, out_array, color = 'red', marker = "o") ; plt.title("numpy.sin()")
plt.show()
例如
heroku ps
heroku ps:stop run.<the dyno number> --app <the heroku app name>
如果heroku ps:stop第一次无法使用,请尝试多次。