AWS ec2 instance reboot runs program twice
$10-30 USD
Paid on delivery
I need someone who can help me resolve an issue with my EC2 instance so that my program doesn't runs twice when the instance reboots.
The operating system used is Windows and the program is written in Python for flask application. When I reboot the instance, I assume it runs my [login to view URL] file twice because there is 2 print statements (see log below for context).
if not [login to view URL]:
[login to view URL]()
print("Scheduler main started...")
I already have "[login to view URL](debug=False, use_reloader=False)".
My "Instance auto-recovery is on Default".
I am relatively new to AWS so I hope you can help solve this.
The successful applicant should have experience working with AWS EC2 instance reboots and a strong working knowledge of Windows and Python. The ideal person would be able to use their skills to figure out what the issue is and how to fix it so the program runs twice when the instance reboots.
If you think you have the necessary skills and experience, I'd love to hear from you. Thank you.
class ReverseProxied(object):
def __init__(self, app):
[login to view URL] = app
def __call__(self, environ, start_response):
scheme = [login to view URL]('HTTP_X_FORWARDED_PROTO')
if scheme:
environ['wsgi.url_scheme'] = scheme
return [login to view URL](environ, start_response)
# application.wsgi_app = ReverseProxied(application.wsgi_app)
application.wsgi_app = ProxyFix(
application.wsgi_app
)
if __name__ == "__main__":
with application.app_context():
db.create_all()
# Public run
[login to view URL](debug=False, use_reloader=False)
2023-06-02T10:12:47.835-04:00 Jun 2 14:12:43 ip-172-31-74-2 web: [2023-06-02 14:12:43 +0000] [1925] [INFO] Starting gunicorn 20.1.0
2023-06-02T10:12:47.835-04:00 Jun 2 14:12:43 ip-172-31-74-2 web: [2023-06-02 14:12:43 +0000] [1925] [INFO] Listening at: [login to view URL] (1925)
2023-06-02T10:12:47.835-04:00 Jun 2 14:12:43 ip-172-31-74-2 web: [2023-06-02 14:12:43 +0000] [1925] [INFO] Using worker: gthread
2023-06-02T10:12:47.835-04:00 Jun 2 14:12:43 ip-172-31-74-2 web: [2023-06-02 14:12:43 +0000] [1990] [INFO] Booting worker with pid: 1990
2023-06-02T10:12:51.175-04:00 Jun 2 14:12:43 ip-172-31-74-2 web: [2023-06-02 14:12:43 +0000] [1991] [INFO] Booting worker with pid: 1991
2023-06-02T10:13:03.802-04:00 Jun 2 14:13:02 ip-172-31-74-2 web: [2023-06-02 14:13:02 +0000] [1925] [INFO] Handling signal: term
2023-06-02T10:13:03.802-04:00 Jun 2 14:13:03 ip-172-31-74-2 web: [2023-06-02 14:13:03 +0000] [1990] [INFO] Worker exiting (pid: 1990)
2023-06-02T10:13:03.802-04:00 Jun 2 14:13:03 ip-172-31-74-2 web: Scheduler main started...
2023-06-02T10:13:03.802-04:00 Jun 2 14:13:03 ip-172-31-74-2 web: [2023-06-02 14:13:03 +0000] [1991] [INFO] Worker exiting (pid: 1991)
2023-06-02T10:13:04.302-04:00 Jun 2 14:13:03 ip-172-31-74-2 web: Scheduler main started...
2023-06-02T10:13:06.057-04:00 Jun 2 14:13:04 ip-172-31-74-2 web: [2023-06-02 14:13:04 +0000] [1925] [INFO] Shutting down: Master
2023-06-02T10:13:06.057-04:00 Jun 2 14:13:05 ip-172-31-74-2 web: [2023-06-02 14:13:05 +0000] [3100] [INFO] Starting gunicorn 20.1.0
2023-06-02T10:13:06.057-04:00 Jun 2 14:13:05 ip-172-31-74-2 web: [2023-06-02 14:13:05 +0000] [3100] [INFO] Listening at: [login to view URL] (3100)
2023-06-02T10:13:06.057-04:00 Jun 2 14:13:05 ip-172-31-74-2 web: [2023-06-02 14:13:05 +0000] [3100] [INFO] Using worker: gthread
2023-06-02T10:13:06.057-04:00 Jun 2 14:13:05 ip-172-31-74-2 web: [2023-06-02 14:13:05 +0000] [3158] [INFO] Booting worker with pid: 3158
2023-06-02T10:13:10.548-04:00 Jun 2 14:13:05 ip-172-31-74-2 web: [2023-06-02 14:13:05 +0000] [3159] [INFO] Booting worker with pid: 3159
Project ID: #36692545
About the project
13 freelancers are bidding on average $44 for this job
✅✅Certified Amazon Solution Architects, Azure, Docker, CI/CD, Jenkins, Terraform, Pulumi & Kubernetes Expert✅✅ ✅I have read your project REQUIREMENT and UNDERSTOOD IT COMPLETELY.✅ ✅Here is some more detail about my s More
AWS expert. I can do it. As 9+ years experiences in these field. I can give good quality work. I have read the guidelines of your work.I believe that i can provide you the best quality works you are anticipating from t More
Hello, my name is manish and I'm excited to hear that you need help with your AWS EC2 instance reboots. With my extensive experience in web hosting services and cloud servers, I believe I am the perfect person to help More
Hi there, I have gone up through the job description I completely understood your all requirement. I have a huge experience in programming skills and languages such as Linux, Cloud Computing, Amazon Web Services, Syste More
Hi, Having more than 5 years of experience in Python & AWS. I'm writing you to show my interest in the available project. I can provide you with my technical assistance for this project. I understand that you are exper More
Hello, my self satyam tripathi and I am also a certified AWS solutions architect, I have around 6+ years of hands-on experience in cloud & DevOps. I saw your requirements, I also did this earlier so as far as better un More
Hello. I have experience in AWS EC2, Python, Flask and Gunicorn. I will help you figure out why the program runs twice. Let's chat!