2007年07月25日 星期三 10:47
dbconn={ 'user': 'root', 'passwd': '123456', 'db': 'test', } def main(): conn=MySQLdb.connect(**dbconn) cursor=conn.cursor() for i in xrange(2): pid=os.fork() cursor.execute('select * from test') print cursor.fetchall() Ϊʲô»á³öÏÖ£ºMySQL server has gone away -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070725/03833271/attachment.html
2007年07月25日 星期三 15:01
fork µÄʱºò£¬conn ÄÚ²¿Ê¹ÓõÄÁ¬½Óµ½ mysql server µÄ socket fd ÔÚ client Õâ±ß±» duplicate ÁË£¬µ«ÊÇÔÚ mysql server ÄDZ߻¹ÊÇÖ»ÓÐÒ»¸ö¡£ È»ºóÕâ¶Î³ÌÐòÔËÐйý³ÌÖУ¬Óнø³ÌÏÈÍ˳öÁË£¬Õâ¸öÏÈÍ˳öµÄ½ø³ÌÔÚÍ˳öʱ°Ñ socket fd ¹Ø±ÕÁË£¬¶ø mysql server Ò²ÊÕµ½ÁËÕâ¸ö¹Ø±ÕµÄ tcp ·Ö½Ú£¬È»ºó mysql server ¾Í°ÑÕâ¸ö socket ¹Ø±ÕÁË¡£µ«Êǵ±Ê±ÕýÔÚÔËÐеÄÆäËû½ø³Ì¾Í»á±¨´íÁË¡£ Òò´Ë£¬Ò»°ãÀ´Ëµ£¬ÔÚ fork ֮ǰÊDz»½¨Òé´ò¿ª client socket µÄ¡£ÔÚ fork Ö®ºóÔÙ´ò¿ª¡£ ÔÚ07-7-25£¬leopay <leopay在gmail.com> дµÀ£º > > dbconn={ > 'user': 'root', > 'passwd': '123456', > 'db': 'test', > } > > def main(): > conn=MySQLdb.connect(**dbconn) > cursor=conn.cursor() > for i in xrange(2): > pid=os.fork() > cursor.execute('select * from test') > print cursor.fetchall () > > > > Ϊʲô»á³öÏÖ£ºMySQL server has gone away > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070725/72636ca8/attachment.htm
2007年07月25日 星期三 23:48
ллÁË ÔÚ07-7-25£¬lau stephen <liusifan在gmail.com> дµÀ£º > > fork µÄʱºò£¬conn ÄÚ²¿Ê¹ÓõÄÁ¬½Óµ½ mysql server µÄ socket fd ÔÚ client Õâ±ß±» duplicate > ÁË£¬µ«ÊÇÔÚ mysql server ÄDZ߻¹ÊÇÖ»ÓÐÒ»¸ö¡£ > È»ºóÕâ¶Î³ÌÐòÔËÐйý³ÌÖУ¬Óнø³ÌÏÈÍ˳öÁË£¬Õâ¸öÏÈÍ˳öµÄ½ø³ÌÔÚÍ˳öʱ°Ñ socket fd ¹Ø±ÕÁË£¬¶ø mysql server Ò²ÊÕµ½ÁËÕâ¸ö¹Ø±ÕµÄ > tcp ·Ö½Ú£¬È»ºó mysql server ¾Í°ÑÕâ¸ö socket ¹Ø±ÕÁË¡£µ«Êǵ±Ê±ÕýÔÚÔËÐеÄÆäËû½ø³Ì¾Í»á±¨´íÁË¡£ > > Òò´Ë£¬Ò»°ãÀ´Ëµ£¬ÔÚ fork ֮ǰÊDz»½¨Òé´ò¿ª client socket µÄ¡£ÔÚ fork Ö®ºóÔÙ´ò¿ª¡£ > > ÔÚ07-7-25£¬leopay <leopay在gmail.com> дµÀ£º > > > > dbconn={ > > 'user': 'root', > > 'passwd': '123456', > > 'db': 'test', > > } > > > > def main(): > > conn=MySQLdb.connect(**dbconn) > > cursor=conn.cursor() > > for i in xrange(2): > > pid=os.fork() > > cursor.execute('select * from test') > > print cursor.fetchall () > > > > > > > > Ϊʲô»á³öÏÖ£ºMySQL server has gone away > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070725/839dd52e/attachment.html
Zeuux © 2025
京ICP备05028076号