{"id":21877632,"url":"https://github.com/rbiedrawa/spring-graceful-shutdown-poc","last_synced_at":"2026-05-05T19:32:45.560Z","repository":{"id":162193116,"uuid":"375896089","full_name":"rbiedrawa/spring-graceful-shutdown-poc","owner":"rbiedrawa","description":"This repository demonstrates how to configure graceful shutdown of Network and default TaskExecutor threads in Spring Boot application.","archived":false,"fork":false,"pushed_at":"2022-01-31T02:05:12.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T16:40:22.311Z","etag":null,"topics":["async","graceful-shutdown","gradle","spring-async","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbiedrawa.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-11T03:42:16.000Z","updated_at":"2021-12-27T12:25:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"823d86a0-83f6-42a2-aaf2-294684492f4b","html_url":"https://github.com/rbiedrawa/spring-graceful-shutdown-poc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rbiedrawa/spring-graceful-shutdown-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-graceful-shutdown-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-graceful-shutdown-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-graceful-shutdown-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-graceful-shutdown-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbiedrawa","download_url":"https://codeload.github.com/rbiedrawa/spring-graceful-shutdown-poc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbiedrawa%2Fspring-graceful-shutdown-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32664931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","graceful-shutdown","gradle","spring-async","spring-boot"],"created_at":"2024-11-28T08:09:49.657Z","updated_at":"2026-05-05T19:32:45.537Z","avatar_url":"https://github.com/rbiedrawa.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot graceful shutdown (PoC)\n\nThis repository demonstrates how to configure graceful shutdown of Network and default TaskExecutor threads in Spring\nBoot application.\n\n## Getting Started\n\n### Prerequisites\n\n* Java 11\n\n### Usage\n\n* Start application in IDE.\n\n* Create async tasks via curl:\n  ```shell\n  curl -X POST --location \"http://localhost:8080/tasks\"\n  ```\n\n* Terminate application while tasks are still running in background threads.\n\n* Check application logs to see if application shutdown gracefully. Sample output below:\n  ```shell\n  # 2021-06-11 06:39:16.977  INFO [nio-8080-exec-1] com.rbiedrawa.app.tasks.TaskController   : Creating task 1\n  # 2021-06-11 06:39:16.990  INFO [    my-thread-1] com.rbiedrawa.app.tasks.TaskService      : Starting long running process id 1\n  # 2021-06-11 06:39:17.609  INFO [nio-8080-exec-2] com.rbiedrawa.app.tasks.TaskController   : Creating task 2\n  # 2021-06-11 06:39:17.609  INFO [    my-thread-2] com.rbiedrawa.app.tasks.TaskService      : Starting long running process id 2\n  # 2021-06-11 06:39:20.103  INFO [extShutdownHook] o.s.b.w.e.tomcat.GracefulShutdown        : Commencing graceful shutdown. Waiting for active requests to complete\n  # 2021-06-11 06:39:20.107  INFO [tomcat-shutdown] o.s.b.w.e.tomcat.GracefulShutdown        : Graceful shutdown complete\n  # 2021-06-11 06:39:20.163  INFO [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'\n  # 2021-06-11 06:39:26.989  INFO [    my-thread-1] com.rbiedrawa.app.tasks.TaskService      : Completed long running process id 1\n  # 2021-06-11 06:39:27.609  INFO [    my-thread-2] com.rbiedrawa.app.tasks.TaskService      : Completed long running process id 2\n  # \n  # Process finished with exit code 130 (interrupted by signal 2: SIGINT)\n  ```\n\n  *** *Using graceful shutdown with your IDE may not work properly if it does not send a proper SIGTERM signal. Refer to\n  the documentation of your IDE for more details.*\n\n## Important Endpoints\n\n| Name | Endpoint | \n| -------------:|:--------:|\n| `Spring Boot Application` | http://localhost:8080 |\n| `Create Async Task - Endpoint` | http://localhost:8080/tasks |\n\n## References\n\n* [Spring Boot Docs - Graceful shutdown](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.graceful-shutdown)\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbiedrawa%2Fspring-graceful-shutdown-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbiedrawa%2Fspring-graceful-shutdown-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbiedrawa%2Fspring-graceful-shutdown-poc/lists"}