SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Shunji Konishi
FLECT Co., LTD
 We run a production service on Heroku
◦ Playframework 1.2.5
◦ Multiple dynos
 Sometimes following error is logged, when dyno is
cycling.
◦ This error happens when play receives a request after
shutdown.
◦ But frequency is very rare.
I've discussed about this problem with Heroku
support team.
This document explains its detail.
play.exceptions.UnexpectedException: Application is not started
 At the shutdown time, Play does nothing to Netty.
 After app shutdowned, Netty still alive and can accept
new request.(But always returns 503)
 When shutdown process takes a few seconds, there is
a possibility to accept new request and return 503.
Normally this duration is
nearly zero sec.
But rarely takes a few seconds.
 https://devcenter.heroku.com/articles/dynos
 Heroku router may send a request after SIGTERM.
◦ When it failed to connect, the request send to other
dynos.
◦ When it received 503, it is accepted.
 Playframework
◦ Play should stop Netty before app shutdown.
◦ There is no way to stop Netty by application developer.
 Heroku
◦ Heroku shouldn’t send request after SIGTERM.
◦ It is out of control for application developer.
Though it may be possible to fix playframework,
it is better to handle this problem by Heroku side.
(Because other framework may have same problem.)
 This is a great feature of Heroku labs.
◦ https://devcenter.heroku.com/articles/labs-preboot
 Preboot changes Heroku restarting behavior
◦ Before: Kill old dynos, then boot new dynos.
◦ After: Boot new dynos first.
 Target
◦ Web dynos only
◦ At least two web dynos are required.
 When
◦ git push
◦ heroku config:set
◦ heroku restart
It doesn’t apply at cycling…
 Currently there is no way to avoid this
problem radically…
 Our service features.
◦ Mostly used in Japan.
◦ So at the midnight(JST), its traffic is not so high.
 If I can control the time of cycling to
midnight(JST), it may reduce error possibility.
◦ Though original frequency is not so high, I want to
reduce error possibility as much as possible.
 https://github.com/gregburek/heroku-
buildpack-toolbelt
 It installs Heroku Toolbelt to dyno.
 So it allows one to run heroku command by
Heroku scheduler.
 Daily at 18:30 (3:30 JST)
◦ vendor/heroku-toolbelt/bin/heroku restart web.1 -a xxx
 Daily at 19:00 (4:00 JST)
◦ vendor/heroku-toolbelt/bin/heroku restart web.2 -a xxx
Delay the timing of restarting multiple dynos.
This settings can reduce daytime cycling.
But it doesn't mean the daytime cycling will never
occur.
e.g. if Heroku detects a fault in underlying
hardware, it will be cycling.
 To solve this problem radically, I hope Heroku
to either of following.
◦ Don’t send request to dyno after SIGTERM.
◦ Apply preboot at cycling.

Weitere ähnliche Inhalte

Was ist angesagt?

Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deploymentNicholas McClay
 
Vagrant 의 활용
Vagrant 의 활용Vagrant 의 활용
Vagrant 의 활용InHwan Chun
 
Nodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsBudh Ram Gurung
 
Site Testing with CasperJS
Site Testing with CasperJSSite Testing with CasperJS
Site Testing with CasperJSJoseph Scott
 
[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginx[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginxNicolas Embleton
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Owain Perry
 
MVC way to introduce Sails.js - node.js framework
MVC way to introduce Sails.js - node.js frameworkMVC way to introduce Sails.js - node.js framework
MVC way to introduce Sails.js - node.js frameworkCaesar Chi
 
Node.js x Azure, cli usage, website deployment
Node.js x Azure, cli usage, website deploymentNode.js x Azure, cli usage, website deployment
Node.js x Azure, cli usage, website deploymentCaesar Chi
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful APISang Cù
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick startji guang
 
Testando JavaScript com Spock
Testando JavaScript com SpockTestando JavaScript com Spock
Testando JavaScript com SpockIsmael
 
ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!Chang W. Doh
 
A Whirlwind Tour of Etsy's Monitoring Stack
A Whirlwind Tour of Etsy's Monitoring StackA Whirlwind Tour of Etsy's Monitoring Stack
A Whirlwind Tour of Etsy's Monitoring StackDaniel Schauenberg
 
Rails after 5 years
Rails after 5 yearsRails after 5 years
Rails after 5 yearsRob Dawson
 

Was ist angesagt? (19)

Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deployment
 
Vagrant 의 활용
Vagrant 의 활용Vagrant 의 활용
Vagrant 의 활용
 
Nodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web Applications
 
Site Testing with CasperJS
Site Testing with CasperJSSite Testing with CasperJS
Site Testing with CasperJS
 
[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginx[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginx
 
Capistrano && SystemD
Capistrano && SystemDCapistrano && SystemD
Capistrano && SystemD
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud
 
MVC way to introduce Sails.js - node.js framework
MVC way to introduce Sails.js - node.js frameworkMVC way to introduce Sails.js - node.js framework
MVC way to introduce Sails.js - node.js framework
 
Node.js x Azure, cli usage, website deployment
Node.js x Azure, cli usage, website deploymentNode.js x Azure, cli usage, website deployment
Node.js x Azure, cli usage, website deployment
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick start
 
Testando JavaScript com Spock
Testando JavaScript com SpockTestando JavaScript com Spock
Testando JavaScript com Spock
 
ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!
 
Aws
AwsAws
Aws
 
A Whirlwind Tour of Etsy's Monitoring Stack
A Whirlwind Tour of Etsy's Monitoring StackA Whirlwind Tour of Etsy's Monitoring Stack
A Whirlwind Tour of Etsy's Monitoring Stack
 
Mobile CI at Etsy
Mobile CI at EtsyMobile CI at Etsy
Mobile CI at Etsy
 
Rails after 5 years
Rails after 5 yearsRails after 5 years
Rails after 5 years
 
Data Driven Monitoring
Data Driven MonitoringData Driven Monitoring
Data Driven Monitoring
 
Yeoman Workflow
Yeoman WorkflowYeoman Workflow
Yeoman Workflow
 

Andere mochten auch

Path: Why you need another social media app
Path: Why you need another social media appPath: Why you need another social media app
Path: Why you need another social media appPeriscope
 
Survey on the Behavior of Path Users in Indonesia
Survey on the Behavior of Path Users in IndonesiaSurvey on the Behavior of Path Users in Indonesia
Survey on the Behavior of Path Users in IndonesiaIdham Raharfian
 
Cav presentation about_indonesia
Cav presentation about_indonesiaCav presentation about_indonesia
Cav presentation about_indonesiaTakahiro Suzuki
 
ベトナムの人気モバイルアプリランキング
ベトナムの人気モバイルアプリランキングベトナムの人気モバイルアプリランキング
ベトナムの人気モバイルアプリランキング Q&Me Vietnam Market Research
 
NE7012- SOCIAL NETWORK ANALYSIS
NE7012- SOCIAL NETWORK ANALYSISNE7012- SOCIAL NETWORK ANALYSIS
NE7012- SOCIAL NETWORK ANALYSISrathnaarul
 
ベトナムオフショア開発を開始するマイクロステップ
ベトナムオフショア開発を開始するマイクロステップベトナムオフショア開発を開始するマイクロステップ
ベトナムオフショア開発を開始するマイクロステップSamurai Incubate Inc.
 
Top 20 Twitter Influencers In Singapore
Top 20 Twitter Influencers In SingaporeTop 20 Twitter Influencers In Singapore
Top 20 Twitter Influencers In SingaporeHappy Marketer
 
Indonesia social media trend 2016 jakpat
Indonesia social media trend 2016 jakpatIndonesia social media trend 2016 jakpat
Indonesia social media trend 2016 jakpatJAKPATAPP
 
Digital in numbers indonesia (compilation)
Digital in numbers indonesia (compilation)Digital in numbers indonesia (compilation)
Digital in numbers indonesia (compilation)Seno Pramuadji
 
Indonesia Digital Landscape 2016
Indonesia Digital Landscape 2016Indonesia Digital Landscape 2016
Indonesia Digital Landscape 2016Doddy Ekaputra
 
Digital numbers and landscape in indonesia 2016 updated
Digital numbers and landscape in indonesia 2016   updatedDigital numbers and landscape in indonesia 2016   updated
Digital numbers and landscape in indonesia 2016 updatedSeno Pramuadji
 
How to Submit Your Content to Reddit
How to Submit Your Content to RedditHow to Submit Your Content to Reddit
How to Submit Your Content to RedditBrent Csutoras
 

Andere mochten auch (14)

Path: Why you need another social media app
Path: Why you need another social media appPath: Why you need another social media app
Path: Why you need another social media app
 
Survey on the Behavior of Path Users in Indonesia
Survey on the Behavior of Path Users in IndonesiaSurvey on the Behavior of Path Users in Indonesia
Survey on the Behavior of Path Users in Indonesia
 
Cav presentation about_indonesia
Cav presentation about_indonesiaCav presentation about_indonesia
Cav presentation about_indonesia
 
ベトナムの人気モバイルアプリランキング
ベトナムの人気モバイルアプリランキングベトナムの人気モバイルアプリランキング
ベトナムの人気モバイルアプリランキング
 
NE7012- SOCIAL NETWORK ANALYSIS
NE7012- SOCIAL NETWORK ANALYSISNE7012- SOCIAL NETWORK ANALYSIS
NE7012- SOCIAL NETWORK ANALYSIS
 
ベトナムオフショア開発を開始するマイクロステップ
ベトナムオフショア開発を開始するマイクロステップベトナムオフショア開発を開始するマイクロステップ
ベトナムオフショア開発を開始するマイクロステップ
 
2015 indonesia digital landscape
2015 indonesia digital landscape 2015 indonesia digital landscape
2015 indonesia digital landscape
 
Top 20 Twitter Influencers In Singapore
Top 20 Twitter Influencers In SingaporeTop 20 Twitter Influencers In Singapore
Top 20 Twitter Influencers In Singapore
 
Indonesia social media trend 2016 jakpat
Indonesia social media trend 2016 jakpatIndonesia social media trend 2016 jakpat
Indonesia social media trend 2016 jakpat
 
Digital in numbers indonesia (compilation)
Digital in numbers indonesia (compilation)Digital in numbers indonesia (compilation)
Digital in numbers indonesia (compilation)
 
7 insights of Indonesia
7 insights of Indonesia7 insights of Indonesia
7 insights of Indonesia
 
Indonesia Digital Landscape 2016
Indonesia Digital Landscape 2016Indonesia Digital Landscape 2016
Indonesia Digital Landscape 2016
 
Digital numbers and landscape in indonesia 2016 updated
Digital numbers and landscape in indonesia 2016   updatedDigital numbers and landscape in indonesia 2016   updated
Digital numbers and landscape in indonesia 2016 updated
 
How to Submit Your Content to Reddit
How to Submit Your Content to RedditHow to Submit Your Content to Reddit
How to Submit Your Content to Reddit
 

Ähnlich wie Dyno cycling behavior of Heroku

Analysing in depth work manager
Analysing in depth work managerAnalysing in depth work manager
Analysing in depth work managerlpu
 
2013-05-15 threads. why and how
2013-05-15 threads. why and how2013-05-15 threads. why and how
2013-05-15 threads. why and howCocoaHeads Tricity
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Improving MeeGo boot-up time
Improving MeeGo boot-up timeImproving MeeGo boot-up time
Improving MeeGo boot-up timeHiroshi Doyu
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentKarim Yaghmour
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful ThreadingCommonsWare
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGearsAlessandro Molina
 
First Real Pull Request Ever
First Real Pull Request EverFirst Real Pull Request Ever
First Real Pull Request EverIkuru Kanuma
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with CanvasPham Huy Tung
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Junichi Ishida
 
jQuery Conference Austin Sept 2013
jQuery Conference Austin Sept 2013jQuery Conference Austin Sept 2013
jQuery Conference Austin Sept 2013dmethvin
 

Ähnlich wie Dyno cycling behavior of Heroku (20)

Analysing in depth work manager
Analysing in depth work managerAnalysing in depth work manager
Analysing in depth work manager
 
2013-05-15 threads. why and how
2013-05-15 threads. why and how2013-05-15 threads. why and how
2013-05-15 threads. why and how
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Improving MeeGo boot-up time
Improving MeeGo boot-up timeImproving MeeGo boot-up time
Improving MeeGo boot-up time
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGears
 
First Real Pull Request Ever
First Real Pull Request EverFirst Real Pull Request Ever
First Real Pull Request Ever
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918
 
Flowframes
FlowframesFlowframes
Flowframes
 
Git sourcecontrolpreso
Git sourcecontrolpresoGit sourcecontrolpreso
Git sourcecontrolpreso
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.
 
jQuery Conference Austin Sept 2013
jQuery Conference Austin Sept 2013jQuery Conference Austin Sept 2013
jQuery Conference Austin Sept 2013
 

Mehr von Shunji Konishi

Salesforceのハッカソンに参加した話
Salesforceのハッカソンに参加した話Salesforceのハッカソンに参加した話
Salesforceのハッカソンに参加した話Shunji Konishi
 
Salesforce連携のためのOData入門
Salesforce連携のためのOData入門Salesforce連携のためのOData入門
Salesforce連携のためのOData入門Shunji Konishi
 
プロキシーを使ってテストを楽にする
プロキシーを使ってテストを楽にするプロキシーを使ってテストを楽にする
プロキシーを使ってテストを楽にするShunji Konishi
 
Javascriptのあれやこれやをまとめて説明してみる
Javascriptのあれやこれやをまとめて説明してみるJavascriptのあれやこれやをまとめて説明してみる
Javascriptのあれやこれやをまとめて説明してみるShunji Konishi
 
MochaとChaiでやるJavaScriptテスト
MochaとChaiでやるJavaScriptテストMochaとChaiでやるJavaScriptテスト
MochaとChaiでやるJavaScriptテストShunji Konishi
 
SendGridサンプルの紹介
SendGridサンプルの紹介SendGridサンプルの紹介
SendGridサンプルの紹介Shunji Konishi
 
セキュリティの考え方
セキュリティの考え方セキュリティの考え方
セキュリティの考え方Shunji Konishi
 
一番簡単なWebSocketの試し方
一番簡単なWebSocketの試し方一番簡単なWebSocketの試し方
一番簡単なWebSocketの試し方Shunji Konishi
 
WebSocketでリアルタイムクイズアプリを作ってみた
WebSocketでリアルタイムクイズアプリを作ってみたWebSocketでリアルタイムクイズアプリを作ってみた
WebSocketでリアルタイムクイズアプリを作ってみたShunji Konishi
 
良質なコードを高速に書くコツ
良質なコードを高速に書くコツ良質なコードを高速に書くコツ
良質なコードを高速に書くコツShunji Konishi
 
Playframework1でSeleniumテスト
Playframework1でSeleniumテストPlayframework1でSeleniumテスト
Playframework1でSeleniumテストShunji Konishi
 
Heroku Dyno再起動時の振る舞い
Heroku Dyno再起動時の振る舞いHeroku Dyno再起動時の振る舞い
Heroku Dyno再起動時の振る舞いShunji Konishi
 
Herokuで使えるRDBMS管理者ツール
Herokuで使えるRDBMS管理者ツールHerokuで使えるRDBMS管理者ツール
Herokuで使えるRDBMS管理者ツールShunji Konishi
 
お手軽Ajaxアプリケーションの作り方
お手軽Ajaxアプリケーションの作り方お手軽Ajaxアプリケーションの作り方
お手軽Ajaxアプリケーションの作り方Shunji Konishi
 
Herokuのログ解析ツール
Herokuのログ解析ツールHerokuのログ解析ツール
Herokuのログ解析ツールShunji Konishi
 
文字コードのお話
文字コードのお話文字コードのお話
文字コードのお話Shunji Konishi
 

Mehr von Shunji Konishi (20)

Salesforceのハッカソンに参加した話
Salesforceのハッカソンに参加した話Salesforceのハッカソンに参加した話
Salesforceのハッカソンに参加した話
 
Salesforce連携のためのOData入門
Salesforce連携のためのOData入門Salesforce連携のためのOData入門
Salesforce連携のためのOData入門
 
プロキシーを使ってテストを楽にする
プロキシーを使ってテストを楽にするプロキシーを使ってテストを楽にする
プロキシーを使ってテストを楽にする
 
Javascriptのあれやこれやをまとめて説明してみる
Javascriptのあれやこれやをまとめて説明してみるJavascriptのあれやこれやをまとめて説明してみる
Javascriptのあれやこれやをまとめて説明してみる
 
MochaとChaiでやるJavaScriptテスト
MochaとChaiでやるJavaScriptテストMochaとChaiでやるJavaScriptテスト
MochaとChaiでやるJavaScriptテスト
 
SendGridサンプルの紹介
SendGridサンプルの紹介SendGridサンプルの紹介
SendGridサンプルの紹介
 
セキュリティの考え方
セキュリティの考え方セキュリティの考え方
セキュリティの考え方
 
一番簡単なWebSocketの試し方
一番簡単なWebSocketの試し方一番簡単なWebSocketの試し方
一番簡単なWebSocketの試し方
 
WebSocketでリアルタイムクイズアプリを作ってみた
WebSocketでリアルタイムクイズアプリを作ってみたWebSocketでリアルタイムクイズアプリを作ってみた
WebSocketでリアルタイムクイズアプリを作ってみた
 
良質なコードを高速に書くコツ
良質なコードを高速に書くコツ良質なコードを高速に書くコツ
良質なコードを高速に書くコツ
 
Heroku tips1
Heroku tips1Heroku tips1
Heroku tips1
 
Playframework1でSeleniumテスト
Playframework1でSeleniumテストPlayframework1でSeleniumテスト
Playframework1でSeleniumテスト
 
Heroku Dyno再起動時の振る舞い
Heroku Dyno再起動時の振る舞いHeroku Dyno再起動時の振る舞い
Heroku Dyno再起動時の振る舞い
 
Herokuで使えるRDBMS管理者ツール
Herokuで使えるRDBMS管理者ツールHerokuで使えるRDBMS管理者ツール
Herokuで使えるRDBMS管理者ツール
 
Play1 to Play2
Play1 to Play2Play1 to Play2
Play1 to Play2
 
お手軽Ajaxアプリケーションの作り方
お手軽Ajaxアプリケーションの作り方お手軽Ajaxアプリケーションの作り方
お手軽Ajaxアプリケーションの作り方
 
Herokuのログ解析ツール
Herokuのログ解析ツールHerokuのログ解析ツール
Herokuのログ解析ツール
 
Excel2 canvas
Excel2 canvasExcel2 canvas
Excel2 canvas
 
特盛!Heroku
特盛!Heroku特盛!Heroku
特盛!Heroku
 
文字コードのお話
文字コードのお話文字コードのお話
文字コードのお話
 

Kürzlich hochgeladen

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Kürzlich hochgeladen (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Dyno cycling behavior of Heroku

  • 2.  We run a production service on Heroku ◦ Playframework 1.2.5 ◦ Multiple dynos  Sometimes following error is logged, when dyno is cycling. ◦ This error happens when play receives a request after shutdown. ◦ But frequency is very rare. I've discussed about this problem with Heroku support team. This document explains its detail. play.exceptions.UnexpectedException: Application is not started
  • 3.  At the shutdown time, Play does nothing to Netty.  After app shutdowned, Netty still alive and can accept new request.(But always returns 503)  When shutdown process takes a few seconds, there is a possibility to accept new request and return 503. Normally this duration is nearly zero sec. But rarely takes a few seconds.
  • 4.  https://devcenter.heroku.com/articles/dynos  Heroku router may send a request after SIGTERM. ◦ When it failed to connect, the request send to other dynos. ◦ When it received 503, it is accepted.
  • 5.  Playframework ◦ Play should stop Netty before app shutdown. ◦ There is no way to stop Netty by application developer.  Heroku ◦ Heroku shouldn’t send request after SIGTERM. ◦ It is out of control for application developer. Though it may be possible to fix playframework, it is better to handle this problem by Heroku side. (Because other framework may have same problem.)
  • 6.  This is a great feature of Heroku labs. ◦ https://devcenter.heroku.com/articles/labs-preboot  Preboot changes Heroku restarting behavior ◦ Before: Kill old dynos, then boot new dynos. ◦ After: Boot new dynos first.
  • 7.  Target ◦ Web dynos only ◦ At least two web dynos are required.  When ◦ git push ◦ heroku config:set ◦ heroku restart It doesn’t apply at cycling…
  • 8.  Currently there is no way to avoid this problem radically…  Our service features. ◦ Mostly used in Japan. ◦ So at the midnight(JST), its traffic is not so high.  If I can control the time of cycling to midnight(JST), it may reduce error possibility. ◦ Though original frequency is not so high, I want to reduce error possibility as much as possible.
  • 9.  https://github.com/gregburek/heroku- buildpack-toolbelt  It installs Heroku Toolbelt to dyno.  So it allows one to run heroku command by Heroku scheduler.
  • 10.  Daily at 18:30 (3:30 JST) ◦ vendor/heroku-toolbelt/bin/heroku restart web.1 -a xxx  Daily at 19:00 (4:00 JST) ◦ vendor/heroku-toolbelt/bin/heroku restart web.2 -a xxx Delay the timing of restarting multiple dynos. This settings can reduce daytime cycling. But it doesn't mean the daytime cycling will never occur. e.g. if Heroku detects a fault in underlying hardware, it will be cycling.
  • 11.  To solve this problem radically, I hope Heroku to either of following. ◦ Don’t send request to dyno after SIGTERM. ◦ Apply preboot at cycling.