KNeighborsClassifier OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata

### Describe the bug

when i run flask app on 56 core cpus,it show this warning and app exit, when i change \site-packages\joblib\externals\loky\backend\context.py can solved

```py
os_cpu_count = min(os.cpu_count() or 1,12)

cpu_count_user = min(_cpu_count_user(os_cpu_count),12)
```

### Steps/Code to Reproduce

```py
#knn is KNeighborsClassifier 
knn= joblib.load('knn.model')
knn.predict(data)
```

### Expected Results

KNeighborsClassifier.predict no bug on 56 cpus or more cpus

### Actual Results

OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata; flask app exit,no Error show.

### Versions

```shell
>>> import sklearn
>>> sklearn.show_versions()

System:
    python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
executable: E:\Program Files\Python310\python.exe
   machine: Windows-10-10.0.14393-SP0

Python dependencies:
      sklearn: 1.2.2
          pip: 23.1.1
   setuptools: 65.5.0
        numpy: 1.24.3
        scipy: 1.10.1
       Cython: None
       pandas: 1.4.3
   matplotlib: 3.7.1
       joblib: 1.2.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
         prefix: vcomp
       filepath: E:\Program Files\Python310\Lib\site-packages\sklearn\.libs\vcomp140.dll
        version: None
    num_threads: 112

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: E:\Program Files\Python310\Lib\site-packages\numpy\.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
        version: 0.3.21
threading_layer: pthreads
   architecture: SkylakeX
    num_threads: 24

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: E:\Program Files\Python310\Lib\site-packages\scipy.libs\libopenblas-802f9ed1179cb9c9b03d67ff79f48187.dll
        version: 0.3.18
threading_layer: pthreads
   architecture: SkylakeX
    num_threads: 24
```

COMMENT:
I also met this problem recently... Yet I found that this always happen after specific predict() call as codes shown below:
```py
def model_assess(model, name='Default'):
    model.fit(X_train, y_train)
    train_y_pred = model.predict(X_train) # this function call could work
    train_acc = 100 * accuracy_score(y_train, train_y_pred)
    print(f'Model: {name}, Training Accuracy: {train_acc}%') # this success to print 
    prds = model.predict(X_val)
    acc = 100 * accuracy_score(y_val, prds)
    name_acc_list["name"].append(name)
    name_acc_list["acc"].append(acc)
    print(f'Model: {name}, Accuracy: {acc}%')

from sklearn.neighbors import KNeighborsClassifier
model_5 = KNeighborsClassifier(n_neighbors=3)
model_assess(model_5, "KNN")
```
Hope my error logs could help. 

```
23:17:52.907 [warn] StdErr from Kernel Process OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.
OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxilia
23:17:52.907 [warn] StdErr from Kernel Process ry array for thread metadata.
OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.
23:17:57.073 [error] Disposing session as kernel process died ExitCode: 3221225477, Reason: OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.
OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.
OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.

23:17:57.073 [info] Dispose Kernel process 27176.
23:17:57.074 [error] Raw kernel process exited code: 3221225477
23:17:57.076 [error] Error in waiting for cell to complete Error: Canceled future for execute_request message before replies were done
    at t.KernelShellFutureHandler.dispose (c:\Users\10719\.vscode\extensions\ms-toolsai.jupyter-2023.4.1011241018-win32-x64\out\extension.node.js:2:32419)
    at c:\Users\10719\.vscode\extensions\ms-toolsai.jupyter-2023.4.1011241018-win32-x64\out\extension.node.js:2:51471
    at Map.forEach (<anonymous>)
    at v._clearKernelState (c:\Users\10719\.vscode\extensions\ms-toolsai.jupyter-2023.4.1011241018-win32-x64\out\extension.node.js:2:51456)
    at v.dispose (c:\Users\10719\.vscode\extensions\ms-toolsai.jupyter-2023.4.1011241018-win32-x64\out\extension.node.js:2:44938)
    at c:\Users\10719\.vscode\extensions\ms-toolsai.jupyter-2023.4.1011241018-win32-x64\out\extension.node.js:24:105531
    at te (c:\Users\10719\.vscode\extensions\ms-toolsai.jupyter-2023.4.1011241018-win32-x64\out\extension.node.js:2:1587099)
    at Zg.dispose (c:\Users\10719\.vscode\extensions\ms-toolsai.jupyter-2023.4.1011241018-win32-x64\out\extension.node.js:24:105507)
    at nv.dispose (c:\Users\10719\.vscode\extensions\ms-toolsai.jupyter-2023.4.1011241018-win32-x64\out\extension.node.js:24:112790)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
23:17:57.077 [warn] Cell completed with errors {
  message: 'Canceled future for execute_request message before replies were done'
}
23:17:57.077 [warn] Cancel all remaining cells due to cancellation or failure in execution
```

Versions:
```
>>> import sklearn
>>> sklearn.show_versions()

System:
    python: 3.10.7 (tags/v3.10.7:6cc6b13, Sep  5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
executable: C:\Users\10719\AppData\Local\Programs\Python\Python310\python.exe
   machine: Windows-10-10.0.19045-SP0

Python dependencies:
      sklearn: 1.2.2
          pip: 23.1.2
   setuptools: 63.2.0
        numpy: 1.24.2
        scipy: 1.10.1
       Cython: None
       pandas: 1.5.3
   matplotlib: 3.7.1
       joblib: 1.2.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
         prefix: vcomp
       filepath: C:\Users\10719\AppData\Local\Programs\Python\Python310\Lib\site-packages\sklearn\.libs\vcomp140.dll
        version: None
    num_threads: 36

   internal_api: openblas
         prefix: libopenblas
       filepath: C:\Users\10719\AppData\Local\Programs\Python\Python310\Lib\site-packages\numpy\.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
        version: 0.3.21
threading_layer: pthreads
   architecture: Haswell
    num_threads: 24

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: C:\Users\10719\AppData\Local\Programs\Python\Python310\Lib\site-packages\scipy.libs\libopenblas-802f9ed1179cb9c9b03d67ff79f48187.dll
        version: 0.3.18
threading_layer: pthreads
   architecture: Haswell
    num_threads: 24
```

Labels: Bug, module:neighbors, Needs Reproducible Code, Needs Investigation, upstream bug