SlideShare a Scribd company logo
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.

More Related Content

What's hot

Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deployment
Nicholas 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 Applications
Budh 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 nginx
Nicolas Embleton
 
Capistrano && SystemD
Capistrano && SystemDCapistrano && SystemD
Capistrano && SystemD
Aleksandr Simonov
 
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 framework
Caesar 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 deployment
Caesar 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 Spock
Ismael
 
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
 
Aws
AwsAws
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
Daniel Schauenberg
 
Mobile CI at Etsy
Mobile CI at EtsyMobile CI at Etsy
Mobile CI at Etsy
Daniel Schauenberg
 
Rails after 5 years
Rails after 5 yearsRails after 5 years
Rails after 5 years
Rob Dawson
 
Data Driven Monitoring
Data Driven MonitoringData Driven Monitoring
Data Driven Monitoring
Daniel Schauenberg
 
Yeoman Workflow
Yeoman WorkflowYeoman Workflow
Yeoman Workflow
John-Philip Johansson
 

What's hot (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
 

Viewers also liked

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
Periscope
 
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
Idham Raharfian
 
Cav presentation about_indonesia
Cav presentation about_indonesiaCav presentation about_indonesia
Cav presentation about_indonesia
Takahiro Suzuki
 
ベトナムの人気モバイルアプリランキング
ベトナムの人気モバイルアプリランキングベトナムの人気モバイルアプリランキング
ベトナムの人気モバイルアプリランキング
Q&Me Vietnam Market Research
 
NE7012- SOCIAL NETWORK ANALYSIS
NE7012- SOCIAL NETWORK ANALYSISNE7012- SOCIAL NETWORK ANALYSIS
NE7012- SOCIAL NETWORK ANALYSIS
rathnaarul
 
ベトナムオフショア開発を開始するマイクロステップ
ベトナムオフショア開発を開始するマイクロステップベトナムオフショア開発を開始するマイクロステップ
ベトナムオフショア開発を開始するマイクロステップSamurai Incubate Inc.
 
2015 indonesia digital landscape
2015 indonesia digital landscape 2015 indonesia digital landscape
2015 indonesia digital landscape
Hermawan Kusuma Atmaja
 
Top 20 Twitter Influencers In Singapore
Top 20 Twitter Influencers In SingaporeTop 20 Twitter Influencers In Singapore
Top 20 Twitter Influencers In Singapore
Happy Marketer
 
Indonesia social media trend 2016 jakpat
Indonesia social media trend 2016 jakpatIndonesia social media trend 2016 jakpat
Indonesia social media trend 2016 jakpat
JAKPATAPP
 
Digital in numbers indonesia (compilation)
Digital in numbers indonesia (compilation)Digital in numbers indonesia (compilation)
Digital in numbers indonesia (compilation)
Seno Pramuadji
 
7 insights of Indonesia
7 insights of Indonesia7 insights of Indonesia
7 insights of Indonesia
Danny Oei Wirianto
 
Indonesia Digital Landscape 2016
Indonesia Digital Landscape 2016Indonesia Digital Landscape 2016
Indonesia Digital Landscape 2016
Doddy 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 updated
Seno 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 Reddit
Brent Csutoras
 

Viewers also liked (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
 

Similar to Dyno cycling behavior of Heroku

Analysing in depth work manager
Analysing in depth work managerAnalysing in depth work manager
Analysing in depth work manager
lpu
 
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 Development
Opersys inc.
 
Improving MeeGo boot-up time
Improving MeeGo boot-up timeImproving MeeGo boot-up time
Improving MeeGo boot-up time
Hiroshi Doyu
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Karim Yaghmour
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
CommonsWare
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys 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 TurboGears
Alessandro Molina
 
First Real Pull Request Ever
First Real Pull Request EverFirst Real Pull Request Ever
First Real Pull Request Ever
Ikuru Kanuma
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
Pham Huy Tung
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918
SUSE Labs Taipei
 
Flowframes
FlowframesFlowframes
Flowframes
Artmiker Studios
 
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 2013
dmethvin
 

Similar to 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
 

More from 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
 
Heroku tips1
Heroku tips1Heroku tips1
Heroku tips1
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
 
Excel2 canvas
Excel2 canvasExcel2 canvas
Excel2 canvas
Shunji Konishi
 
特盛!Heroku
特盛!Heroku特盛!Heroku
特盛!Heroku
Shunji Konishi
 
文字コードのお話
文字コードのお話文字コードのお話
文字コードのお話
Shunji Konishi
 

More from 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
 
文字コードのお話
文字コードのお話文字コードのお話
文字コードのお話
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 

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.