尝试将Flask应用程序部署到Heroku,在缩放dyno后出现h14错误

时间:2020-04-21 14:38:13

标签: python flask heroku

我正在尝试将Flask应用程序部署到Heroku,但是我检查了日志并不断收到此H14错误,表明没有任何Web进程正在运行。我在heroku ps:scale worker=1之后做了heroku push master命令,它说它能够缩放动态Scaling dynos... done, now running worker at 1:Free。尽管我仍然收到H14错误。是什么原因导致我收到此错误消息或我做错了什么?

1 个答案:

答案 0 :(得分:1)

尝试扩大网络测功力(烧瓶表明您将有传入流量)

import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap as coloring

# copy the dfs below and use pd.read_clipboard() to reproduce
df_1
     A   B   C   D   E
Mg  10  15  23  25  27
Ca  30  33   0  20  17

df_2
     A   B   C   D   E
Mg  20  12   8  40  10
Ca   7  26  12  22  16

hatches=(' ', '//')
colors_ABCDE=['tomato', 'gold', 'greenyellow', 'forestgreen', 'palevioletred']
dfs=[df_1,df_2]

for each_df, df in enumerate(dfs):
    df.plot(ax=plt.subplot(111), kind="barh", \
            stacked=True, hatch=hatches[each_df], \
            colormap=coloring.from_list("my_colormap", colors_ABCDE), \
            figsize=(7,2.5), position=len(dfs)-each_df-1, \
            align='center', width=0.2, edgecolor="darkgrey")

plt.legend(loc='center left', bbox_to_anchor=(1.0, 0.5), fontsize=12)