# rclpy: Service call timed out waiting for response from /my_service

- **ID:** `ros2/ros2-service-call-timeout-no-response`
- **Domain:** ros2
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The service server is not responding within the timeout period, often because it is busy, blocked, or not properly spinning.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| ROS2 Humble (rclpy 3.3.0) | active | — | — |
| ROS2 Iron (rclpy 4.0.0) | active | — | — |
| ROS2 Rolling (rclpy 5.0.0) | active | — | — |

## Workarounds

1. **Check that the server node is spinning: ensure rclpy.spin(node) is called in the server code. If using a multithreaded executor, verify it is running.** (85% success)
   ```
   Check that the server node is spinning: ensure rclpy.spin(node) is called in the server code. If using a multithreaded executor, verify it is running.
   ```
2. **Add a retry mechanism with exponential backoff in the client: while not future.done(): time.sleep(0.1); if not rclpy.ok(): break** (80% success)
   ```
   Add a retry mechanism with exponential backoff in the client: while not future.done(): time.sleep(0.1); if not rclpy.ok(): break
   ```

## Dead Ends

- **Increase the timeout duration in the client code** — The server may be completely unresponsive; a longer timeout just delays the failure. (70% fail)
- **Restart the client node only** — The server node needs to be restarted or checked; client restart does not fix server issues. (90% fail)
