主頁 > 企業開發 > 無法在heroku中生成視頻輸出

無法在heroku中生成視頻輸出

2022-02-25 14:47:37 企業開發

我使用燒瓶、opencv 和 mediapipe 制作了這個簡單的人臉檢測和跟蹤應用程式。這在我的本地主機上完全可以正常作業,但是當我在 Heroku 上部署它時,應用程式無法顯示結果。有人可以告訴我這里有什么問題嗎?部署 - http://face1-detection.herokuapp.com/

應用程式.py:

import base64
import cv2
import io

import numpy as np
from PIL import Image
from engineio.payload import Payload
from flask import Flask, render_template
from flask_socketio import SocketIO, emit
import mediapipe as mp

Payload.max_decode_packets = 2048

app = Flask(__name__)
socketio = SocketIO(app, cors_allowed_origins='*')


@app.route('/', methods=['POST', 'GET'])
def index():
    return render_template('index.html')


def readb64(base64_string):
    idx = base64_string.find('base64,')
    base64_string = base64_string[idx   7:]

    sbuf = io.BytesIO()

    sbuf.write(base64.b64decode(base64_string, ' /'))
    pimg = Image.open(sbuf)

    return cv2.cvtColor(np.array(pimg), cv2.COLOR_RGB2BGR)



@socketio.on('catch-frame')
def catch_frame(data):
    emit('response_back', data)



@socketio.on('image')
def image(data_image):
    frame = (readb64(data_image))
    frame = face_detector(frame)

    imgencode = cv2.imencode('.jpeg', frame, [cv2.IMWRITE_JPEG_QUALITY, 40])[1]

    # base64 encode
    stringData = base64.b64encode(imgencode).decode('utf-8')
    b64_src = 'data:image/jpeg;base64,'
    stringData = b64_src   stringData

    # emit the frame back
    emit('response_back', stringData)


def face_detector(img):
    mpFaceDetection = mp.solutions.face_detection
    faceDetection = mpFaceDetection.FaceDetection()

    img = cv2.flip(img, 1)
    results = faceDetection.process(img)
    if results.detections:
        for id, detection in enumerate(results.detections):
            if detection.score[0] > 0.50:
                bboxc = detection.location_data.relative_bounding_box
                ih, iw, ic = img.shape
                bbox = int(bboxc.xmin * iw), int(bboxc.ymin * ih), int(bboxc.width * iw), int(bboxc.height * ih)
                cv2.rectangle(img, bbox, (0, 255, 0), 2)
                cv2.putText(img, f"{int(detection.score[0] * 100)}%",
                            (int(bboxc.xmin * iw), int(bboxc.ymin * ih - 15)),
                            cv2.FONT_ITALIC, 1.5, (255, 255, 255), 2)

    cv2.waitKey(0)
    return img


if __name__ == '__main__':
    socketio.run(app, port=9990, debug=True)

索引.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Face Detection/Tracking</title>

     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
     <script src='https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.0/socket.io.js'></script>
</head>

<body>

    <div id="container">
    <video autoplay playsinline id="videoElement"></video>
    <canvas id="canvas"  width="400" height="300"></canvas>
    </div>

    <div class = 'video'>
        <img id="photo"  width="400"  height="300">
    </div>

    <script type="text/javascript" charset="utf-8">

        var socket = io.connect(window.location.protocol   '//'   document.domain   ':'   location.port);
        socket.on('connect', function(){
            console.log("Connected...!", socket.connected)
        });


        var canvas = document.getElementById('canvas');
        var context = canvas.getContext('2d');
        const video = document.querySelector("#videoElement");

        video.width = 400;
        video.height = 300;


        if (navigator.mediaDevices.getUserMedia) {
            navigator.mediaDevices.getUserMedia({ video: true })
            .then(function (stream) {
                video.srcObject = stream;
                video.play();
            })
            .catch(function (err0r) {

            });
        }

        const FPS = 10;
        setInterval(() => {
            width=video.width;
            height=video.height;
            context.drawImage(video, 0, 0, width , height );
            var data = canvas.toDataURL('image/jpeg', 0.5);
            context.clearRect(0, 0, width,height );
            socket.emit('image', data);
        }, 1000/FPS);

        socket.on('response_back', function(image){
                photo.setAttribute('src', image );

        });

    </script>


 </body>

</html>

這是字面上的入口代碼。如果有人知道是什么問題,請告訴我

heroku 日志:

2022-02-24T12:25:42.965622 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/threading.py", line 973, in _bootstrap_inner
2022-02-24T12:25:42.965975 00:00 app[web.1]: self.run()
2022-02-24T12:25:42.965978 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/threading.py", line 910, in run
2022-02-24T12:25:42.966270 00:00 app[web.1]: self._target(*self._args, **self._kwargs)
2022-02-24T12:25:42.966271 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/socketio/server.py", line 682, in _handle_event_internal
2022-02-24T12:25:42.966505 00:00 app[web.1]: r = server._trigger_event(data[0], namespace, sid, *data[1:])
2022-02-24T12:25:42.966508 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/socketio/server.py", line 711, in _trigger_event
2022-02-24T12:25:42.966760 00:00 app[web.1]: return self.handlers[namespace][event](*args)
2022-02-24T12:25:42.966762 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask_socketio/__init__.py", line 282, in _handler
2022-02-24T12:25:42.966976 00:00 app[web.1]: return self._handle_event(handler, message, namespace, sid,
2022-02-24T12:25:42.966988 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask_socketio/__init__.py", line 713, in _handle_event
2022-02-24T12:25:42.967281 00:00 app[web.1]: ret = handler(*args)
2022-02-24T12:25:42.967283 00:00 app[web.1]: File "/app/app.py", line 45, in image
2022-02-24T12:25:42.967418 00:00 app[web.1]: frame = face_detector(frame)
2022-02-24T12:25:42.967421 00:00 app[web.1]: File "/app/app.py", line 75, in face_detector
2022-02-24T12:25:42.967505 00:00 app[web.1]: cv2.waitKey(0)
2022-02-24T12:25:42.967534 00:00 app[web.1]: cv2.error: OpenCV(4.5.5) /io/opencv/modules/highgui/src/window.cpp:1334: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK  2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'
2022-02-24T12:25:42.967534 00:00 app[web.1]:
2022-02-24T12:26:09.779758 00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/socket.io/?EIO=3&transport=polling&t=NyhiQuB&sid=29235acf6cbb4841a384245766e80a2b" host=newfacetrack.herokuapp.com request_id=d61b9d83-a0e0-4eb0-9d24-dfe323cc4edd fwd="27.57.153.242" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
2022-02-24T12:26:10.655608 00:00 app[web.1]: [2022-02-24 12:26:10  0000] [4] [CRITICAL] WORKER TIMEOUT (pid:186)
2022-02-24T12:26:10.656419 00:00 app[web.1]: [2022-02-24 12:26:10  0000] [186] [INFO] Worker exiting (pid: 186)
2022-02-24T12:26:11.666532 00:00 app[web.1]: [2022-02-24 12:26:11  0000] [4] [WARNING] Worker with pid 186 was terminated due to signal 9
2022-02-24T12:26:11.669039 00:00 app[web.1]: [2022-02-24 12:26:11  0000] [234] [INFO] Booting worker with pid: 234
2022-02-24T12:26:13.042608 00:00 app[web.1]: 10.1.86.207 - - [24/Feb/2022:12:26:13  0000] "POST /socket.io/?EIO=3&transport=polling&t=NyhiRpq&sid=9cc0990633a541dc87c57595bfb13d16 HTTP/1.1" 400 11 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:13.042740 00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=NyhiQuB&sid=29235acf6cbb4841a384245766e80a2b" host=newfacetrack.herokuapp.com request_id=64b4b546-f9ce-453a-8066-104dc6255af5 fwd="27.57.153.242" dyno=web.1 connect=0ms service=2290ms status=400 bytes=217 protocol=https
2022-02-24T12:26:13.043767 00:00 app[web.1]: 10.1.61.212 - - [24/Feb/2022:12:26:13  0000] "GET /socket.io/?EIO=3&transport=polling&t=NyhiQuB&sid=29235acf6cbb4841a384245766e80a2b HTTP/1.1" 400 11 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:13.043901 00:00 heroku[router]: at=info method=POST path="/socket.io/?EIO=3&transport=polling&t=NyhiRpq&sid=9cc0990633a541dc87c57595bfb13d16" host=newfacetrack.herokuapp.com request_id=0bcad996-a7c6-46f0-8c10-8ceb1b47cfea fwd="27.57.153.242" dyno=web.1 connect=0ms service=29783ms status=400 bytes=282 protocol=https
2022-02-24T12:26:13.232505 00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/socket.io/?EIO=3&transport=polling&t=NyhiReF&sid=9cc0990633a541dc87c57595bfb13d16" host=newfacetrack.herokuapp.com request_id=432efae7-3f32-4fc2-9afa-41ebf72254e3 fwd="27.57.153.242" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=https
2022-02-24T12:26:13.429670 00:00 heroku[router]: at=info method=POST path="/socket.io/?EIO=3&transport=polling&t=NyhiZBQ&sid=9cc0990633a541dc87c57595bfb13d16" host=newfacetrack.herokuapp.com request_id=e50fa29c-b6f2-4e69-9c25-4272b6a9ca3d fwd="27.57.153.242" dyno=web.1 connect=0ms service=1ms status=400 bytes=282 protocol=https
2022-02-24T12:26:13.430897 00:00 app[web.1]: 10.1.61.212 - - [24/Feb/2022:12:26:13  0000] "POST /socket.io/?EIO=3&transport=polling&t=NyhiZBQ&sid=9cc0990633a541dc87c57595bfb13d16 HTTP/1.1" 400 11 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:13.696329 00:00 app[web.1]: [2022-02-24 12:26:13  0000] [4] [CRITICAL] WORKER TIMEOUT (pid:194)
2022-02-24T12:26:13.697959 00:00 app[web.1]: [2022-02-24 12:26:13  0000] [194] [INFO] Worker exiting (pid: 194)
2022-02-24T12:26:14.707233 00:00 app[web.1]: [2022-02-24 12:26:14  0000] [4] [WARNING] Worker with pid 194 was terminated due to signal 9
2022-02-24T12:26:14.710332 00:00 app[web.1]: [2022-02-24 12:26:14  0000] [242] [INFO] Booting worker with pid: 242
2022-02-24T12:26:15.048217 00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=NyhiZah" host=newfacetrack.herokuapp.com request_id=e617be25-8fb5-4955-8d1a-f55828face7a fwd="27.57.153.242" dyno=web.1 connect=0ms service=5ms status=200 bytes=390 protocol=https
2022-02-24T12:26:15.049518 00:00 app[web.1]: 10.1.61.212 - - [24/Feb/2022:12:26:15  0000] "GET /socket.io/?EIO=3&transport=polling&t=NyhiZah HTTP/1.1" 200 107 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:15.764956 00:00 heroku[router]: at=info method=POST path="/socket.io/?EIO=3&transport=polling&t=NyhiZfu&sid=fe6ff1caa2e94b669a5ec16e1b3b560f" host=newfacetrack.herokuapp.com request_id=5f5ddd22-675e-40c9-9725-46a5a174d20a fwd="27.57.153.242" dyno=web.1 connect=0ms service=386ms status=200 bytes=264 protocol=https
2022-02-24T12:26:15.766176 00:00 app[web.1]: 10.1.61.212 - - [24/Feb/2022:12:26:15  0000] "POST /socket.io/?EIO=3&transport=polling&t=NyhiZfu&sid=fe6ff1caa2e94b669a5ec16e1b3b560f HTTP/1.1" 200 2 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:15.819042 00:00 app[web.1]: INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2022-02-24T12:26:15.843333 00:00 app[web.1]: Exception in thread Thread-2:
2022-02-24T12:26:15.843349 00:00 app[web.1]: Traceback (most recent call last):
2022-02-24T12:26:15.843365 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/threading.py", line 973, in _bootstrap_inner
2022-02-24T12:26:15.843762 00:00 app[web.1]: self.run()
2022-02-24T12:26:15.843777 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/threading.py", line 910, in run
2022-02-24T12:26:15.844159 00:00 app[web.1]: self._target(*self._args, **self._kwargs)
2022-02-24T12:26:15.844179 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/socketio/server.py", line 682, in _handle_event_internal
2022-02-24T12:26:15.844630 00:00 app[web.1]: r = server._trigger_event(data[0], namespace, sid, *data[1:])
2022-02-24T12:26:15.844744 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/socketio/server.py", line 711, in _trigger_event
2022-02-24T12:26:15.845771 00:00 app[web.1]: return self.handlers[namespace][event](*args)
2022-02-24T12:26:15.845792 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask_socketio/__init__.py", line 282, in _handler
2022-02-24T12:26:15.846006 00:00 app[web.1]: return self._handle_event(handler, message, namespace, sid,
2022-02-24T12:26:15.846020 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask_socketio/__init__.py", line 713, in _handle_event
2022-02-24T12:26:15.846336 00:00 app[web.1]: ret = handler(*args)
2022-02-24T12:26:15.846350 00:00 app[web.1]: File "/app/app.py", line 45, in image
2022-02-24T12:26:15.846458 00:00 app[web.1]: frame = face_detector(frame)
2022-02-24T12:26:15.846483 00:00 app[web.1]: File "/app/app.py", line 75, in face_detector
2022-02-24T12:26:15.846678 00:00 app[web.1]: cv2.waitKey(0)
2022-02-24T12:26:15.846748 00:00 app[web.1]: cv2.error: OpenCV(4.5.5) /io/opencv/modules/highgui/src/window.cpp:1334: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK  2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'
2022-02-24T12:26:15.846760 00:00 app[web.1]:
2022-02-24T12:26:16.866520 00:00 heroku[router]: at=info method=POST path="/socket.io/?EIO=3&transport=polling&t=NyhiZsa&sid=fe6ff1caa2e94b669a5ec16e1b3b560f" host=newfacetrack.herokuapp.com request_id=6a81ebf1-8ab9-4a1e-96f3-537d564c3a59 fwd="27.57.153.242" dyno=web.1 connect=0ms service=676ms status=400 bytes=282 protocol=https
2022-02-24T12:26:16.867623 00:00 app[web.1]: 10.1.61.212 - - [24/Feb/2022:12:26:16  0000] "POST /socket.io/?EIO=3&transport=polling&t=NyhiZsa&sid=fe6ff1caa2e94b669a5ec16e1b3b560f HTTP/1.1" 400 11 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:17.334909 00:00 heroku[router]: at=info method=POST path="/socket.io/?EIO=3&transport=polling&t=Nyhia8Q&sid=fe6ff1caa2e94b669a5ec16e1b3b560f" host=newfacetrack.herokuapp.com request_id=9a67de4f-58e2-4919-a636-1ac3bf0d6ce7 fwd="27.57.153.242" dyno=web.1 connect=0ms service=1ms status=400 bytes=282 protocol=https
2022-02-24T12:26:17.336190 00:00 app[web.1]: 10.1.61.212 - - [24/Feb/2022:12:26:17  0000] "POST /socket.io/?EIO=3&transport=polling&t=Nyhia8Q&sid=fe6ff1caa2e94b669a5ec16e1b3b560f HTTP/1.1" 400 11 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:19.037947 00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=NyhiaZ4" host=newfacetrack.herokuapp.com request_id=57087b58-ce3a-4422-a17e-54751a6a665c fwd="27.57.153.242" dyno=web.1 connect=0ms service=1ms status=200 bytes=390 protocol=https
2022-02-24T12:26:19.039249 00:00 app[web.1]: 10.1.61.212 - - [24/Feb/2022:12:26:19  0000] "GET /socket.io/?EIO=3&transport=polling&t=NyhiaZ4 HTTP/1.1" 200 107 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:19.377341 00:00 heroku[router]: at=info method=POST path="/socket.io/?EIO=3&transport=polling&t=NyhiaeH&sid=987213a56f574506a7fe38ec6a023e81" host=newfacetrack.herokuapp.com request_id=e5fbacaf-fd00-4b7e-9c45-5cb1fbe5d3c5 fwd="27.57.153.242" dyno=web.1 connect=0ms service=2ms status=200 bytes=264 protocol=https
2022-02-24T12:26:19.378487 00:00 app[web.1]: 10.1.61.212 - - [24/Feb/2022:12:26:19  0000] "POST /socket.io/?EIO=3&transport=polling&t=NyhiaeH&sid=987213a56f574506a7fe38ec6a023e81 HTTP/1.1" 200 2 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:19.990013 00:00 app[web.1]: INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2022-02-24T12:26:20.005617 00:00 app[web.1]: Exception in thread Thread-2:
2022-02-24T12:26:20.005620 00:00 app[web.1]: Traceback (most recent call last):
2022-02-24T12:26:20.005640 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/threading.py", line 973, in _bootstrap_inner
2022-02-24T12:26:20.006002 00:00 app[web.1]: self.run()
2022-02-24T12:26:20.006003 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/threading.py", line 910, in run
2022-02-24T12:26:20.006246 00:00 app[web.1]: self._target(*self._args, **self._kwargs)
2022-02-24T12:26:20.006249 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/socketio/server.py", line 682, in _handle_event_internal
2022-02-24T12:26:20.006393 00:00 app[web.1]: r = server._trigger_event(data[0], namespace, sid, *data[1:])
2022-02-24T12:26:20.006395 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/socketio/server.py", line 711, in _trigger_event
2022-02-24T12:26:20.006535 00:00 app[web.1]: return self.handlers[namespace][event](*args)
2022-02-24T12:26:20.006546 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask_socketio/__init__.py", line 282, in _handler
2022-02-24T12:26:20.006625 00:00 app[web.1]: return self._handle_event(handler, message, namespace, sid,
2022-02-24T12:26:20.006627 00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask_socketio/__init__.py", line 713, in _handle_event
2022-02-24T12:26:20.006775 00:00 app[web.1]: ret = handler(*args)
2022-02-24T12:26:20.006776 00:00 app[web.1]: File "/app/app.py", line 45, in image
2022-02-24T12:26:20.006819 00:00 app[web.1]: frame = face_detector(frame)
2022-02-24T12:26:20.006821 00:00 app[web.1]: File "/app/app.py", line 75, in face_detector
2022-02-24T12:26:20.006872 00:00 app[web.1]: cv2.waitKey(0)
2022-02-24T12:26:20.006909 00:00 app[web.1]: cv2.error: OpenCV(4.5.5) /io/opencv/modules/highgui/src/window.cpp:1334: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK  2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'
2022-02-24T12:26:20.006910 00:00 app[web.1]:
2022-02-24T12:26:45.394033 00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/socket.io/?EIO=3&transport=polling&t=NyhiZfw&sid=fe6ff1caa2e94b669a5ec16e1b3b560f" host=newfacetrack.herokuapp.com request_id=c6c1e0b6-c6d6-4ad0-af76-43362b45e9fc fwd="27.57.153.242" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
2022-02-24T12:26:45.997770 00:00 app[web.1]: [2022-02-24 12:26:45  0000] [4] [CRITICAL] WORKER TIMEOUT (pid:234)
2022-02-24T12:26:45.998218 00:00 app[web.1]: [2022-02-24 12:26:45  0000] [234] [INFO] Worker exiting (pid: 234)
2022-02-24T12:26:47.007109 00:00 app[web.1]: [2022-02-24 12:26:47  0000] [4] [WARNING] Worker with pid 234 was terminated due to signal 9
2022-02-24T12:26:47.009926 00:00 app[web.1]: [2022-02-24 12:26:47  0000] [282] [INFO] Booting worker with pid: 282
2022-02-24T12:26:48.611144 00:00 app[web.1]: 10.1.63.238 - - [24/Feb/2022:12:26:48  0000] "POST /socket.io/?EIO=3&transport=polling&t=Nyhiajz&sid=987213a56f574506a7fe38ec6a023e81 HTTP/1.1" 400 11 "https://newfacetrack.herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
2022-02-24T12:26:48.611974 00:00 heroku[router]: sock=client at=warning code=H27 desc="Client Request Interrupted" method=POST path="/socket.io/?EIO=3&transport=polling&t=Nyhiajz&sid=987213a56f574506a7fe38ec6a023e81" host=newfacetrack.herokuapp.com request_id=ef81a1bf-da56-4bf0-9258-f8589af364bb fwd="27.57.153.242" dyno=web.1 connect=0ms service=28603ms status=499 bytes= protocol=https
2022-02-24T12:26:49.699755 00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/socket.io/?EIO=3&transport=polling&t=NyhiaeJ&sid=987213a56f574506a7fe38ec6a023e81" host=newfacetrack.herokuapp.com request_id=13ab5d74-ff0b-42c2-8327-bd40c0900da2 fwd="27.57.153.242" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
2022-02-24T12:26:50.065428 00:00 app[web.1]: [2022-02-24 12:26:50  0000] [4] [CRITICAL] WORKER TIMEOUT (pid:242)
2022-02-24T12:26:50.067465 00:00 app[web.1]: [2022-02-24 12:26:50  0000] [242] [INFO] Worker exiting (pid: 242)
2022-02-24T12:26:51.080378 00:00 app[web.1]: [2022-02-24 12:26:51  0000] [4] [WARNING] Worker with pid 242 was terminated due to signal 9
2022-02-24T12:26:51.082532 00:00 app[web.1]: [2022-02-24 12:26:51  0000] [290] [INFO] Booting worker with pid: 290

uj5u.com熱心網友回復:

Python 代碼當前使用waitKey(0),但在這種情況下沒有意義。沒有人坐在資料中心內等待為您按下鍵盤上的鍵。

從您的代碼中洗掉它,我認為您會很高興。

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/432450.html

標籤:Python opencv 烧瓶 heroku 人脸检测

上一篇:如何使用燒瓶發送pdf檔案以進行ajax回應?

下一篇:使用pythonflask-login的登錄回圈

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • IEEE1588PTP在數字化變電站時鐘同步方面的應用

    IEEE1588ptp在數字化變電站時鐘同步方面的應用 京準電子科技官微——ahjzsz 一、電力系統時間同步基本概況 隨著對IEC 61850標準研究的不斷深入,國內外學者提出基于IEC61850通信標準體系建設數字化變電站的發展思路。數字化變電站與常規變電站的顯著區別在于程序層傳統的電流/電壓互 ......

    uj5u.com 2020-09-10 03:51:52 more
  • HTTP request smuggling CL.TE

    CL.TE 簡介 前端通過Content-Length處理請求,通過反向代理或者負載均衡將請求轉發到后端,后端Transfer-Encoding優先級較高,以TE處理請求造成安全問題。 檢測 發送如下資料包 POST / HTTP/1.1 Host: ac391f7e1e9af821806e890 ......

    uj5u.com 2020-09-10 03:52:11 more
  • 網路滲透資料大全單——漏洞庫篇

    網路滲透資料大全單——漏洞庫篇漏洞庫 NVD ——美國國家漏洞庫 →http://nvd.nist.gov/。 CERT ——美國國家應急回應中心 →https://www.us-cert.gov/ OSVDB ——開源漏洞庫 →http://osvdb.org Bugtraq ——賽門鐵克 →ht ......

    uj5u.com 2020-09-10 03:52:15 more
  • 京準講述NTP時鐘服務器應用及原理

    京準講述NTP時鐘服務器應用及原理京準講述NTP時鐘服務器應用及原理 安徽京準電子科技官微——ahjzsz 北斗授時原理 授時是指接識訓通過某種方式獲得本地時間與北斗標準時間的鐘差,然后調整本地時鐘使時差控制在一定的精度范圍內。 衛星導航系統通常由三部分組成:導航授時衛星、地面檢測校正維護系統和用戶 ......

    uj5u.com 2020-09-10 03:52:25 more
  • 利用北斗衛星系統設計NTP網路時間服務器

    利用北斗衛星系統設計NTP網路時間服務器 利用北斗衛星系統設計NTP網路時間服務器 安徽京準電子科技官微——ahjzsz 概述 NTP網路時間服務器是一款支持NTP和SNTP網路時間同步協議,高精度、大容量、高品質的高科技時鐘產品。 NTP網路時間服務器設備采用冗余架構設計,高精度時鐘直接來源于北斗 ......

    uj5u.com 2020-09-10 03:52:35 more
  • 詳細解讀電力系統各種對時方式

    詳細解讀電力系統各種對時方式 詳細解讀電力系統各種對時方式 安徽京準電子科技官微——ahjzsz,更多資料請添加VX 衛星同步時鐘是我京準公司開發研制的應用衛星授時時技術的標準時間顯示和發送的裝置,該裝置以M國全球定位系統(GLOBAL POSITIONING SYSTEM,縮寫為GPS)或者我國北 ......

    uj5u.com 2020-09-10 03:52:45 more
  • 如何保證外包團隊接入企業內網安全

    不管企業規模的大小,只要企業想省錢,那么企業的某些服務就一定會采用外包的形式,然而看似美好又經濟的策略,其實也有不好的一面。下面我通過安全的角度來聊聊使用外包團的安全隱患問題。 先看看什么服務會使用外包的,最常見的就是話務/客服這種需要大量重復性、無技術性的服務,或者是一些銷售外包、特殊的職能外包等 ......

    uj5u.com 2020-09-10 03:52:57 more
  • PHP漏洞之【整型數字型SQL注入】

    0x01 什么是SQL注入 SQL是一種注入攻擊,通過前端帶入后端資料庫進行惡意的SQL陳述句查詢。 0x02 SQL整型注入原理 SQL注入一般發生在動態網站URL地址里,當然也會發生在其它地發,如登錄框等等也會存在注入,只要是和資料庫打交道的地方都有可能存在。 如這里http://192.168. ......

    uj5u.com 2020-09-10 03:55:40 more
  • [GXYCTF2019]禁止套娃

    git泄露獲取原始碼 使用GET傳參,引數為exp 經過三層過濾執行 第一層過濾偽協議,第二層過濾帶引數的函式,第三層過濾一些函式 preg_replace('/[a-z,_]+\((?R)?\)/', NULL, $_GET['exp'] (?R)參考當前正則運算式,相當于匹配函式里的引數 因此傳遞 ......

    uj5u.com 2020-09-10 03:56:07 more
  • 等保2.0實施流程

    流程 結論 ......

    uj5u.com 2020-09-10 03:56:16 more
最新发布
  • 使用Django Rest framework搭建Blog

    在前面的Blog例子中我們使用的是GraphQL, 雖然GraphQL的使用處于上升趨勢,但是Rest API還是使用的更廣泛一些. 所以還是決定回到傳統的rest api framework上來, Django rest framework的官網上給了一個很好用的QuickStart, 我參考Qu ......

    uj5u.com 2023-04-20 08:17:54 more
  • 記錄-new Date() 我忍你很久了!

    這里給大家分享我在網上總結出來的一些知識,希望對大家有所幫助 大家平時在開發的時候有沒被new Date()折磨過?就是它的諸多怪異的設定讓你每每用的時候,都可能不小心踩坑。造成程式意外出錯,卻一下子找不到問題出處,那叫一個煩透了…… 下面,我就列舉它的“四宗罪”及應用思考 可惡的四宗罪 1. Sa ......

    uj5u.com 2023-04-20 08:17:47 more
  • 使用Vue.js實作文字跑馬燈效果

    實作文字跑馬燈效果,首先用到 substring()截取 和 setInterval計時器 clearInterval()清除計時器 效果如下: 實作代碼如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta ......

    uj5u.com 2023-04-20 08:12:31 more
  • JavaScript 運算子

    JavaScript 運算子/運算子 在 JavaScript 中,有一些運算子可以使代碼更簡潔、易讀和高效。以下是一些常見的運算子: 1、可選鏈運算子(optional chaining operator) ?.是可選鏈運算子(optional chaining operator)。?. 可選鏈操 ......

    uj5u.com 2023-04-20 08:02:25 more
  • CSS—相對單位rem

    一、概述 rem是一個相對長度單位,它的單位長度取決于根標簽html的字體尺寸。rem即root em的意思,中文翻譯為根em。瀏覽器的文本尺寸一般默認為16px,即默認情況下: 1rem = 16px rem布局原理:根據CSS媒體查詢功能,更改根標簽的字體尺寸,實作rem單位隨螢屏尺寸的變化,如 ......

    uj5u.com 2023-04-20 08:02:21 more
  • 我的第一個NPM包:panghu-planebattle-esm(胖虎飛機大戰)使用說明

    好家伙,我的包終于開發完啦 歡迎使用胖虎的飛機大戰包!! 為你的主頁添加色彩 這是一個有趣的網頁小游戲包,使用canvas和js開發 使用ES6模塊化開發 效果圖如下: (覺得圖片太sb的可以自己改) 代碼已開源!! Git: https://gitee.com/tang-and-han-dynas ......

    uj5u.com 2023-04-20 08:01:50 more
  • 如何在 vue3 中使用 jsx/tsx?

    我們都知道,通常情況下我們使用 vue 大多都是用的 SFC(Signle File Component)單檔案組件模式,即一個組件就是一個檔案,但其實 Vue 也是支持使用 JSX 來撰寫組件的。這里不討論 SFC 和 JSX 的好壞,這個仁者見仁智者見智。本篇文章旨在帶領大家快速了解和使用 Vu ......

    uj5u.com 2023-04-20 08:01:37 more
  • 【Vue2.x原始碼系列06】計算屬性computed原理

    本章目標:計算屬性是如何實作的?計算屬性快取原理以及洋蔥模型的應用?在初始化Vue實體時,我們會給每個計算屬性都創建一個對應watcher,我們稱之為計算屬性watcher ......

    uj5u.com 2023-04-20 08:01:31 more
  • http1.1與http2.0

    一、http是什么 通俗來講,http就是計算機通過網路進行通信的規則,是一個基于請求與回應,無狀態的,應用層協議。常用于TCP/IP協議傳輸資料。目前任何終端之間任何一種通信方式都必須按Http協議進行,否則無法連接。tcp(三次握手,四次揮手)。 請求與回應:客戶端請求、服務端回應資料。 無狀態 ......

    uj5u.com 2023-04-20 08:01:10 more
  • http1.1與http2.0

    一、http是什么 通俗來講,http就是計算機通過網路進行通信的規則,是一個基于請求與回應,無狀態的,應用層協議。常用于TCP/IP協議傳輸資料。目前任何終端之間任何一種通信方式都必須按Http協議進行,否則無法連接。tcp(三次握手,四次揮手)。 請求與回應:客戶端請求、服務端回應資料。 無狀態 ......

    uj5u.com 2023-04-20 08:00:32 more