Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx error (502 Bad Gateway) #8

Open
bookoly opened this issue Dec 21, 2024 · 1 comment
Open

Nginx error (502 Bad Gateway) #8

bookoly opened this issue Dec 21, 2024 · 1 comment

Comments

@bookoly
Copy link

bookoly commented Dec 21, 2024

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

@CodeWithKyrian
Copy link
Owner

Could you provide more details about your Ubuntu server setup and how you configured your PHP environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants