Skip to content

Commit

Permalink
chore: increase the timeout for stable diffusion example (mosecorg#427)
Browse files Browse the repository at this point in the history
Signed-off-by: Keming <kemingy94@gmail.com>
  • Loading branch information
kemingy authored Aug 3, 2023
1 parent f608421 commit 01235cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ python examples/stable_diffusion/server.py --help
Then let's start the server with debug logs:

```shell
python examples/stable_diffusion/server.py --log-level debug
python examples/stable_diffusion/server.py --log-level debug --timeout 30000
```

And in another terminal, test it:
Expand Down
4 changes: 4 additions & 0 deletions docs/source/examples/stable_diffusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ docker run --rm --gpus all -p 8000:8000 sd:serving
:code: python
```

```shell
python server.py --timeout 30000
```

## Client

```shell
Expand Down
3 changes: 2 additions & 1 deletion src/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ impl TaskManager {
pub(crate) async fn submit_task(&self, data: Bytes) -> Result<Task, ServiceError> {
let (id, rx) = self.add_new_task(data)?;
if let Err(err) = time::timeout(self.timeout, rx).await {
warn!(%id, %err, "task was not completed in the expected time");
warn!(%id, %err, "task was not completed in the expected time, if this happens a lot, \
you might want to increase the service timeout");
self.delete_task(id, false);
return Err(ServiceError::Timeout);
}
Expand Down

0 comments on commit 01235cc

Please sign in to comment.