Skip to content

Nginx error (502 Bad Gateway) #8

@bookoly

Description

@bookoly

Since yesterday I get an nginx error (502 bad gateway), when trying to transcribe my audio file on my Ubuntu 22.04.3 LTS server. Before that everything worked fine. On my local machine (macbook with m3) everything works fine as well with laravel sail and docker.

The laravel application runs on:

  • Laravel 11.36.1
  • PHP 8.4
  • codewithkyrian/whisper.php 1.1.0

I set memory_limit to -1 without success. The audio file is only 30 seconds long.

I also noticed that the process stucks on line $whisper = Whisper::fromPretrained( (which i didn't change for a couple of days):

$params = WhisperFullParams::default()
    ->withTokenTimestamps()
    ->withMaxLen(1)
    ->withSplitOnWord(true) // Optional: prevents splitting on tokens
    ->withNThreads($nThreads)
    ->withLanguage($subtitle->language->value);

$whisper = Whisper::fromPretrained(
     modelName: $this->subtitle->language === Language::ENGLISH ? $modelName . '.en' : $modelName,
     baseDir: config('whisper.baseDir'),
     params: $params,
);

Any ideas ?
Sadly there are no errors in the nginx logs.

Below is the whole log output on the ubuntu server:

[2024-12-20 18:45:10] local.INFO: whisper_init_with_params_no_state: use gpu = 0
[2024-12-20 18:45:10] local.INFO: whisper_init_with_params_no_state: flash attn = 0
[2024-12-20 18:45:10] local.INFO: whisper_init_with_params_no_state: gpu_device = 0
[2024-12-20 18:45:10] local.INFO: whisper_init_with_params_no_state: dtw = 0
[2024-12-20 18:45:10] local.INFO: whisper_init_with_params_no_state: backends = 1
[2024-12-20 18:45:10] local.INFO: whisper_model_load: loading model
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_vocab = 51864
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_audio_ctx = 1500
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_audio_state = 768
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_audio_head = 12
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_audio_layer = 12
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_text_ctx = 448
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_text_state = 768
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_text_head = 12
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_text_layer = 12
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_mels = 80
[2024-12-20 18:45:10] local.INFO: whisper_model_load: ftype = 1
[2024-12-20 18:45:10] local.INFO: whisper_model_load: qntvr = 0
[2024-12-20 18:45:10] local.INFO: whisper_model_load: type = 3 (small)
[2024-12-20 18:45:10] local.INFO: whisper_model_load: adding 1607 extra tokens
[2024-12-20 18:45:10] local.INFO: whisper_model_load: n_langs = 99

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions