首页 > 编程语言 >PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)

时间:2024-04-15 09:11:47浏览次数:22  
标签:tried 134217728 exhausted bytes allocate memory size

问题

返回的json数据太大导致Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)
image

解决方案

修改php.ini的memory_limit

修改 php.ini 中的 memory_limit 数值,默认 128M,不够用可以改成 256M 或 512M
image
宝塔中修改
image
点击“服务”>重启或重载配置即可。
image
再次查看
image

不需要的字段不返回

标签:tried,134217728,exhausted,bytes,allocate,memory,size
From: https://www.cnblogs.com/aeolian/p/18135119

相关文章

  • 使用SecureCRT上传大于4G的文件:is too large for zmodem.ZModem does not support fil
    问题使用SecureCRT通过rz命令上传大于4G的文件时,软件报错解决需要通过SecureRCT自带的SFTP解决。使用快捷键alt+p打开SFTP会话上传文件Windows->Linux#向服务器上传文件put<targetfile>#向服务器上传文件夹及内容put-r<targetdirectory>下载文件Lin......
  • 1071 - Specified key was too long; max key length is 767 bytes
    1071-Specifiedkeywastoolong;maxkeylengthis767bytes问题背景问题分析处理问题背景今天在Mysql建表的过程中,遇到了一个这样的问题,错误信息1071-Specifiedkeywastoolong;maxkeylengthis767bytes下面来分析如何处理问题分析处理根据错误......
  • python bytes格式的一些转换
    importbinascii#中文字符串转bytess="中国"b=s.encode("utf-8")print(b)#输出:b'\xe4\xb8\xad\xe5\x9b\xbd'#bytes转字符串,默认utf-8解码print(b.decode())#输出:中国#16进制字符串转byteshex_s="e4b8ade59bbd"b=bytes.fromhex(he......
  • Cause: java.sql.SQLException: Thread stack overrun: 266768 bytes used of a 2867
    ###Cause:java.sql.SQLException:Threadstackoverrun:266768bytesusedofa286720bytestack,and20000bytesneeded.Use'mysqld--thread_stack=#'tospecifyabiggerstack.;uncategorizedSQLException;SQLstate[HY000];errorcode[143......
  • Python数据类型中bytes 与 bytearray
    在Python中,我们可以使用bytes和bytearray两种数据类型来处理二进制数据。bytes是一个不可变的序列类型,而bytearray是一个可变的序列类型。本文将介绍如何使用Python来创建、操作和转换bytes和bytearray。bytes:可以看作是一组二进制数值(0-255)的str序列bytearray:可以看......
  • 详解'unicodeescape' codec can't decode bytes in position 16-17: malformed \N ch
    详解'unicodeescape'codeccan'tdecodebytesinposition16-17:malformed\Ncharacterescape在Python的字符串处理中,有时候可能会遇到如下错误信息:'unicodeescape'codeccan'tdecodebytesinposition16-17:malformed\Ncharacterescape。本篇文章将详细解释这个错......
  • go库bytes
    bytesstrings的基本操作与bytes的基本操作基本类似 #基本操作#比较和比较相关的方法有:funcEqual(a,b[]byte)boolfuncEqualFold(s,t[]byte)boolfuncCompare(a,b[]byte)int其中Equal和Compare是使用汇编来实现的。例如:a:=[]byte("hello")b:=[]byte("......
  • Go语言核心36讲 38 | bytes包与字节串操作(上)
    我相信,经过上一次的学习,你已经对strings.Builder和strings.Reader这两个类型足够熟悉了。我上次还建议你去自行查阅strings代码包中的其他程序实体。如果你认真去看了,那么肯定会对我们今天要讨论的bytes代码包,有种似曾相识的感觉。前导内容:bytes.Buffer基础知识strings包和b......
  • python之bytes与str互转
    fromhex()bytes.fromhex()是一个内置函数,用于从十六进制字符串创建字节串(bytes)对象。fromhex()方法接受一个十六进制字符串作为输入,并将其转换为对应的字节串。输入的十六进制字符串可以包含数字0-9和小写字母a-f(或大写字母A-F)。以下是使用bytes.fromhex()的示例代码:hex_stri......
  • python-bytes型和string型的转换
    https://blog.csdn.net/weixin_43936250/article/details/124410127数据加解密时通常是以bytes形式存储,加解密算法运行前需要先对数据进行处理。以SM4算法示例数据为例,待加密数据为:0123456789abcdeffedcba9876543210,bytes类型则有两种表示方式message1=b'0123456789abcdeffed......