broken-pipe

Getting broken pipe when passing mysql connection to a python thread

假如想象 提交于 2021-02-07 06:44:13
问题 I'm trying to pass a mysql connection to a thread in python. If i do the initialization of the mysql inside the worker class, there is no error. However, it might be costly for the connection so I tried just passing the mysql connection from the caller function (see code below). But this keeps throwing this error: (2006, "MySQL server has gone away (BrokenPipeError(32, 'Broken pipe')) Any idea why? I think its because the way we pass the mysql connection def worker(db): """ Distributes the

How can I set Socket write timout in java?

别说谁变了你拦得住时间么 提交于 2020-01-20 07:02:29
问题 I have a problem with handling socket in java. I am running a TCP server with multiple client connections. For performance reason, I used a simple thread pool to handle packets. Please see code below public enum LazyWorkCenter { instance; LazyWorkCenter() { lazyWorker = new NamedThreadPoolExecutor(3,3, 0L,TimeUnit.MILLISECONDS, "LazyWorker"); } private ExecutorService lazyWorker ; public void executeLazy(Runnable lazyTask) { lazyWorker.execute(lazyTask); } } public class TcpServerForClient {

android: java.net.SocketException: Broken pipe LG

狂风中的少年 提交于 2020-01-16 18:18:57
问题 I'm developing an application for Android 2.2 and LG Black devices. When I run the application on my LG device I get the following SocketException, which is never happen on other devices! Broken pipe java.net.SocketException: Broken pipe at org.apache.harmony.luni.platform.OSNetworkSystem.writeSocketImpl(Native Method) at org.apache.harmony.luni.platform.OSNetworkSystem.write(OSNetworkSystem.java:723) at org.apache.harmony.luni.net.PlainSocketImpl.write(PlainSocketImpl.java:578) at org.apache

Filter out broken pipe errors from template execution

混江龙づ霸主 提交于 2020-01-13 19:28:15
问题 This is similar to Filter out broken pipe errors , but with complications - when a user presses the "stop" button on their browser while a template is executing (html/template.Execute or text/template.Execute), a broken pipe error occurs. However, I believe that the error returned by the text/template package is simply of type *errors.errorString as the broken pipe message appears to be wrapped in some other informational text and so no type assertion can be made to net.OpErr for comparison

Python BaseHTTPServer, how do I catch/trap “broken pipe” errors?

微笑、不失礼 提交于 2019-12-29 05:57:47
问题 I build a short url translator engine in Python, and I'm seeing a TON of "broken pipe" errors, and I'm curious how to trap it best when using the BaseHTTPServer classes. This isn't the entire code, but gives you an idea of what I'm doing so far: from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import memcache class clientThread(BaseHTTPRequestHandler): def do_GET(self): content = None http_code,response_txt,long_url = \ self.ag_trans_url(self.path,content,'GET') self.http_output(

What happens to a process in an EC2 instance when I get a 'Broken Pipe' error on ssh?

删除回忆录丶 提交于 2019-12-24 03:26:24
问题 I am using some EC2 instances to run some large jobs I can not run locally. The issue I am seeing is that after a while (X hours since the process started) my connection on my shell gives me a broken pipe error ubuntu@ip-10-122-xxx-xxx:~/stratto/ode$ Write failed: Broken pipe The instance is still there because I can reconnect with no problems, but how can I reconnect and get back at seeing the logs of the process as before the 'Broken Pipe' Any tip much appreciated, Thanks! 回答1: Redirect

Python socket.send() can only send once, then socket.error: [Errno 32] Broken pipe occurred

a 夏天 提交于 2019-12-20 10:37:51
问题 I'm a newbie in network programming, so please forgive me if this is a dumb question :) I created 1 client and 1 SocketServer.ThreadingMixIn server on Ubuntu 10.04.2 using Python2.7, but it seems like I can only call sock.send() once in client, then I'll get a: Traceback (most recent call last): File "testClient1.py", line 33, in <module> sock.send('c1:{0}'.format(n)) socket.error: [Errno 32] Broken pipe Here's the code I wrote: testClient1.py: #! /usr/bin/python2.7 # -*- coding: UTF-8 -*-

Broken Pipe Exception on Grails App

蓝咒 提交于 2019-12-20 05:42:06
问题 I developed an application on Grails 2.4.4 using jdk 1.7 and MySQL Workbench 6.3. It works for some time, but after some hours of the deployment i try to log in, it stops working and throws the exception "java.net.SocketException: Broken pipe". 2016-10-24 09:40:53,599 [http-nio-8080-exec-12] ERROR errors.GrailsExceptionResolver - SocketException occurred when processing request: [POST] /login/autenticacao Broken pipe. Stacktrace follows: java.net.SocketException: Broken pipe at java.net

ffmpeg av_interleaved_write_frame(): Broken pipe under windows

陌路散爱 提交于 2019-12-20 02:54:13
问题 I am using ffmpeg to convert original media file to rawvideo yuv format, ouputed the yuv to pipe, then my command tool receive the raw yuv as input, do some processing. e.g: D:\huang_xuezhong\build_win32_VDNAGen>ffmpeg -i test.mkv -c:v rawvideo -s 320x240 -f rawvideo - | my_tool -o output every time, when run the command, ffmpeg will dump this av_interleaved_write_frame(): Broken pipe error msg: Output #0, rawvideo, to 'pipe:': Metadata: encoder : Lavf56.4.101 Stream #0:0: Video: rawvideo

Broken pipe when pushing to git repository

一世执手 提交于 2019-12-17 22:36:43
问题 I'm trying to push for the first time a code to my git repository but i get the following error: Counting objects: 222026, done. Compressing objects: 100% (208850/208850), done. Write failed: Broken pipe222026) error: pack-objects died of signal 13 fatal: The remote end hung up unexpectedly error: failed to push some refs to 'ssh://git@bitbucket.org/<...>' I tried to increase the http buffer size ( git config http.postBuffer 524288000 ), I tried to git repack , but it did not work. I was able