我在Openshifts免费套餐上有一个Python 3.3,mongodb,cron webapp。
我知道Openshift免费套餐有5分钟的时间限制来运行cron作业或外部进程。作为一项实验,我尝试在我的主要网络应用程序的主题中运行我的任务。
我认为,由于任务是一个线程,因此它不会受到5分钟的限制,因为它是主要的Web应用程序流程的所有部分。
但是,当我启动启动线程任务的应用程序时,应用程序会在2-3分钟内关闭并发出502代理错误。重启是必要的。我把它从尾巴中拉出来
任何想法是怎么回事?是否还会开启CPU周期限制?我是否在Openshift上达到了一些资源限制?有什么方法可以说明吗?
Thu May 15 13:15:53.047 [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
Thu May 15 13:15:53.048 [signalProcessingThread] now exiting
Thu May 15 13:15:53.058 dbexit:
Thu May 15 13:15:53.058 [signalProcessingThread] shutdown: going to close listening sockets...
Thu May 15 13:15:53.058 [signalProcessingThread] closing listening socket: 11
Thu May 15 13:15:53.058 [signalProcessingThread] shutdown: going to flush diaglog...
Thu May 15 13:15:53.058 [signalProcessingThread] shutdown: going to close sockets...
Thu May 15 13:15:53.111 [signalProcessingThread] shutdown: waiting for fs preallocator...
Thu May 15 13:15:53.111 [signalProcessingThread] shutdown: lock for final commit...
Thu May 15 13:15:53.111 [signalProcessingThread] shutdown: final commit...
Thu May 15 13:15:53.112 [signalProcessingThread] shutdown: closing all files...
Thu May 15 13:15:53.112 [signalProcessingThread] closeAllFiles() finished
Thu May 15 13:15:53.112 [signalProcessingThread] journalCleanup...
Thu May 15 13:15:53.112 [signalProcessingThread] removeJournalFiles
Thu May 15 13:15:53.145 [signalProcessingThread] shutdown: removing fs lock...
Thu May 15 13:15:53.166 dbexit: really exiting now
You can tail this application directly with:
ssh -t XXXXXXXX@XXXXXXXXXXX.rhcloud.com 'tail */logs/*'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/ruby_compat.rb:30:in `select': closed stream (IOError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/ruby_compat.rb:30:in `io_select'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/transport/packet_stream.rb:73:in `available_for_read?'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/transport/packet_stream.rb:85:in `next_packet'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/transport/session.rb:172:in `block in poll_message'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/transport/session.rb:167:in `loop'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/transport/session.rb:167:in `poll_message'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:454:in `dispatch_incoming_packets'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:216:in `preprocess'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:200:in `process'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `block in loop'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `loop'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh/connection/session.rb:164:in `loop'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/lib/rhc/ssh_helpers.rb:51:in `block in ssh_ruby'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/net-ssh-2.6.7/lib/net/ssh.rb:199:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/lib/rhc/ssh_helpers.rb:39:in `ssh_ruby'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/lib/rhc/commands/tail.rb:39:in `tail'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/lib/rhc/commands/tail.rb:20:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/lib/rhc/commands.rb:240:in `execute'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/lib/rhc/commands.rb:231:in `block (3 levels) in to_commander'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:155:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/runner.rb:402:in `run_active_command'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/lib/rhc/command_runner.rb:70:in `run!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/delegates.rb:7:in `run!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/lib/rhc/cli.rb:36:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rhc-1.7.8/bin/rhc:18:in `<top (required)>'
from C:/Ruby200-x64/bin/rhc:23:in `load'
from C:/Ruby200-x64/bin/rhc:23:in `<main>'
答案 0 :(得分:0)
OpenShift Online具有磁盘空间,内存和CPU限制,具体取决于您使用的设备大小。如果您使用的是免费帐户(小装备),那么您的应用程序可能正在耗尽内存或CPU周期。您可以尝试使用此知识库文章检查内存限制违规:https://www.openshift.com/kb/kb-e1082-how-to-check-for-memory-limit-violations