Amazon web services 亚马逊ELB上的Laravel4:未定义属性:$attributes

Amazon web services 亚马逊ELB上的Laravel4:未定义属性:$attributes,amazon-web-services,amazon-ec2,laravel,laravel-4,amazon-elastic-beanstalk,Amazon Web Services,Amazon Ec2,Laravel,Laravel 4,Amazon Elastic Beanstalk,我正在AmazonElasticBeanstalk上运行一个Laravel4.0应用程序,使用AmazonLinux64位和PHP5.4.21标准AMI 每当git aws.push完成或Amazon默认的每日cron作业运行时(这会导致Apache重新启动),我的应用程序在基于雄辩的模型创建调用中会突然出现异常,直到我重新启动Apache,有时会出现1-2次。从那时起,服务器将正常运行,直到下一次Apache重启(通过每日作业或git推送等方式) /为简洁起见,v/a/c=/var/app/c

我正在AmazonElasticBeanstalk上运行一个Laravel4.0应用程序,使用AmazonLinux64位和PHP5.4.21标准AMI

每当git aws.push完成或Amazon默认的每日cron作业运行时(这会导致Apache重新启动),我的应用程序在基于雄辩的模型创建调用中会突然出现异常,直到我重新启动Apache,有时会出现1-2次。从那时起,服务器将正常运行,直到下一次Apache重启(通过每日作业或git推送等方式)

/为简洁起见,v/a/c=/var/app/current
MyApp\Store\Order
extensed
elount

我真的不知道如何诊断并最终解决这个问题,我正在寻求建议


更新:我删除了下面请求的调用函数,因为它们似乎不相关。他们通过了所有测试,并成功地处理了数千份订单。在Apache重新启动1-2次之前,至少有一个其他基于雄辩的模型(即,
MyApp\User
)在对其调用create()时也会发生这种情况。

我已升级到,并且此问题已消失。我相信这与APC缓存(不在5.5中)有关,但我不能肯定地说。

将我给虚拟机的内存量从2GB增加到4GB似乎解决了这个问题。事实证明,快速加载需要大量内存。

将php.ini内存使用量从512M增加到1024M对我来说是个不错的选择。

你能发布
过程
方法吗?它不是引发异常的那个吗?您是否查看了该方法的调用方?在Laravel的模型类中,在getAttribute()函数中会出现异常,特别是对array\u key\u的调用($key,$this->attributes)$这个->属性不存在,尽管它在类中初始化为空数组。
[2013-12-22 19:34:52] log.ERROR: Exception in orderProcessor->process: 
exception 'ErrorException' with message 'Undefined property: 
MyApp\Store\Order::$attributes' in /v/a/c/bootstrap/compiled.php:6266
Stack trace:
#0 /v/a/c/bootstrap/compiled.php(6266): Illuminate\Exception\Handler->handleError(8, 'Undefined prope...', '/v/a/c...', 6266, Array)
#1 /v/a/c/bootstrap/compiled.php(6461): Illuminate\Database\Eloquent\Model->getAttribute('attributes')
#2 /v/a/c/bootstrap/compiled.php(6379): Illuminate\Database\Eloquent\Model->__get('attributes')
#3 /v/a/c/bootstrap/compiled.php(5530): Illuminate\Database\Eloquent\Model->syncOriginal()
#4 /v/a/c/bootstrap/compiled.php(5589): Illuminate\Database\Eloquent\Model->__construct(Array)
#5 /v/a/c/app/MyApp/Store/Repositories/EloquentOrderRepository.php(62): Illuminate\Database\Eloquent\Model::create(Array)
#6 /v/a/c/app/MyApp/Store/OrderProcessor.php(65): MyApp\Store\Repositories\EloquentOrderRepository->create(Array)
#7 /v/a/c/app/controllers/StoreController.php(122): MyApp\Store\OrderProcessor->process(Object(MyApp\User), Object(MyApp\Store\Cart))
... controller and route calls ...