[yii\queue\Queue] [10] unknown job (attempt: 1, PID: 31167) is finished with error: yii\base\ErrorException: unserialize(): Error at offset 1922 of 65535 bytes
网上的解决方案:
1. 报错场景:序列化字段中有中文,反序列化时有可能会出现报错。
错误原因:写入和取出数据库的时候,编码不同,中文符号长度不同,序列化中的长度就无法匹配。
解决办法:适合 php 5.5+
//使用正则将错误的长度修正,@param $str @return正确的序列化字符串
preg_replace_callback('#s:(\d+):"(.*?)";#s',function($match){return 's:'.strlen($match[2]).':"'.$match[2].'";';},$str);
测试依旧报错,而且并没有写入库,不符合上面报错原因-从库中读数。
将中文排除后再测试一次。
2. 突然想起来我的原因是,因为将file读成了base64,特别长,所以会报这个错。
mark一下。
[yii\queue\Queue] [10] unknown job (attempt: 1, PID: 31167) is finished with error: yii\base\ErrorException: unserialize(): Error at offset 1922 of 65535 bytes的更多相关文章
- async+队列queue.Queue()
import queue import time import random import threading import asyncio import logging logging.basicC ...
- [python] Queue.Queue vs. collections.deque
https://stackoverflow.com/questions/717148/queue-queue-vs-collections-deque/717199#717199 Queue,Queu ...
- YII报错笔记:<pre>PHP Notice 'yii\base\ErrorException' with message 'Uninitialized string offset: 0' in /my/test/project/iot/vendor/yiisoft/yii2/base/Model.php:778
YII常见报错笔记 报错返回的代码如下: <pre>PHP Notice 'yii\base\ErrorException' with message 'Uninitialized str ...
- exception 'yii\base\ErrorException' with message 'Class 'MongoClient' not found'
问题描述: 本来项目运行的好好的,搬了一次办公室(电脑主机一起搬的),第二天的时候就登录不了了. php版本和扩展没有改变,且没有修改任何配置,我尝试重启php5-fpm 服务,又重启nginx服务, ...
- Discuz云平台站点信息同步失败,An unknown error occurred. May be DNS Error.
站点信息同步失败 An unknown error occurred. May be DNS Error. (ERRCODE:1) 经过Discuz教程网(http://www.1314study.c ...
- Error response from daemon: rpc error: code = Unknown desc = name conflicts with
环境:centos7 执行一下命令时, docker service create --mode global --name logspout gliderlabs/logspout 出现以下报错: ...
- UVa 12100 Printer Queue(queue或者vector模拟队列)
The only printer in the computer science students' union is experiencing an extremely heavy workload ...
- queue.Queue()
一.构造方法 Queue是构造方法,函数签名是Queue(maxsize=0) ,其中maxsize设置队列的大小. 二.实例方法 Queue.qsize(): 返回queue的近似值.注意:qsiz ...
- Yii框架的学习指南(策码秀才篇)1-1 如何认识Yii framework
Yii的框架和其他框架的区别在于:它是更加 快速,安全,专业的PHP框架 Yii是一个高性能的,适用于开发WEB2.0应用的PHP框架. Yii是一个基于组件.用于开发大型 Web 应用的 高性能 P ...
随机推荐
- html提交表单,php在后台获取表单内容的方法_例1
html代码: <html> <head> <meta http-equiv="Content-Type" content="t ...
- RedHat Enterprise7 修改为CentOS的yum源
报错 解决 1.将自带的yum卸载掉 2.下载centos的yum并安装 wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-met ...
- 小D课堂 - 新版本微服务springcloud+Docker教程_6-06 zuul微服务网关集群搭建
笔记 6.Zuul微服务网关集群搭建 简介:微服务网关Zull集群搭建 1.nginx+lvs+keepalive https://www.cnblogs.com/liuyisai/ ...
- hutool-all 包把实体Bean转化成字符串,以及把字符串转化成Bean对象
GxyJobEntity gxyJobEntity1 = new GxyJobEntity(); gxyJobEntity1.setUserId("user001"); gxyJo ...
- Visual Studio Code 帮助查看器,指定的用于安装帮助内容的位置无效,或者您无权访问该位置
今天有个C# 类库文件里面的属性想要了解下,想到了Vs的帮助文档,其实也就是微软的MSDN:提示帮助查看器,指定的用于安装帮助内容的位置无效,或者您无权访问该位置: 最近两天vs也没有更新,并且也没有 ...
- 利用canvas对图片进行切割
使用input标签选择一张图片, 然后利用canvas对图片进行切割, 可以设置切割的行数和列数 这是html代码 ... <input type="file" id=&qu ...
- Capacity To Ship Packages Within D Days
A conveyor belt has packages that must be shipped from one port to another within D days. The i-th p ...
- 解决Win7上的连接access数据库的问题
最近做了一个win桌面程序,没有用sql 数据库,而是用access数据库,因为access比sql用起来方便多了,最主要是不要安装sql server,直接放在程序里面,然后创建连接字符就可以了,s ...
- [HNOI2008]越狱 题解
题面: 我们知道:相邻房间的犯人的宗教相同的方案数=总方案数-相邻房间的犯人的宗教不相同的方案数: 那么所有方案数是m^n; 我们假设第一个房间有m中取值方案,而对于每个房间(非第一个)都有m-1个取 ...
- spark内核篇-任务调度机制
在生产环境中,spark 部署方式一般都是 yarn-cluster 模式,本文针对该模式进行讲解,当然大体思路也适用于其他模式 基础概念 一个 spark 应用包含 job.stage.task 三 ...