BuzzingPixel

Ansel for Craft

Ansel for EE

Treasury

Construct

Category Construct

Dashboard (open an issue here)

All Issues

My Issues

News Contact
Log in

Logged in as

Licenses Purchases Profile Change Password Billing Portal Admin
Log Out
Software
Ansel for Craft Ansel for EE Treasury Construct Category Construct
Support
Dashboard (open an issue here) All Issues My Issues
News Contact
Log in
Logged in as:
Licenses Purchases Profile Change Password Billing Portal Log Out
Dashboard All Issues My Issues
Support Dashboard
  1. Home
  2. Home
  3. Support Dashboard
  4. View Issue

Saving entries causes fatal error, memory exhausted

#64 opened by Stian

Subscribe

Details

Clarification Requested

Public Issue

Visibility: Public
3 replies
Last reply by Stian
Created 11/7/2017 5:22 AM
Updated 11/7/2017 11:00 AM
Ansel for Craft 1.0.7-b.1
CMS Version: Craft 2.6.2994
PHP Version: 7.0.25
MySQL Version: 10.1.22-MariaDB
Additional Environment Details:

memory_limit 1024M upload_max_filesize 512M post_max_size 512M

Description

This only happens with Ansel. When I try uploading the same image in a native assets field, it saves the entry almost instantly.

Please see video documenting steps to reproduce: https://drive.google.com/file/d/0B8JsOGTrYBIjaWppVThNS3h1QU0/view

PS! I downgraded to Ansel 1.0.6 just to try that too, but got same result.

Replies

  • Stian

    Replied 11/7/2017 5:42 AM, Edited 11/7/2017 11:00 AM

    I enabled imagemagick on the server and suddenly adding new entries with Ansel started working.

    Still, I'm having issues here and there. Some entries with ansel fields can't be deleted for instance. Sorry about rushing with these tickets. I'll do more testing on my own for now and get back to you when I need you.

    Thanks

  • TJ Draper

    Replied 11/7/2017 9:21 AM, Edited 11/7/2017 11:00 AM

    Hi Stian,

    Ansel processes every image through GD (or, as you've noted, ImageMagick if it's installed on the server). Unlike Assets, Ansel does not just upload a file, it resizes/crops as necessary, and optimizes it. Image manipulation is tricky (in PHP at least) and takes a massive amount of memory (PNGs in particular seem to be the worst).

    That said, a 6.74 mb jpeg (if that's the accurate size I see from the video) certainly should cause an issue with 1024M of memory allocated to PHP. I suspect there's still a limit set somewhere much too low. I don't recommend downgrading as none of the changes I’ve made in the beta will have anything to do with memory consumption.

    I’ll definitely need more info on issues with deleting fields.

  • Stian

    Replied 11/7/2017 11:00 AM

    Hey, trying to delete the entry just gives me a flash message ("An unknown error occurred."). Trying to save that same entry gives

    CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`mandaomm_craft_tenotec`.`craft_anselImages`, CONSTRAINT `craft_anselImages_originalAssetId_fk` FOREIGN KEY (`originalAssetId`) REFERENCES `craft_assetfiles` (`id`) ON DELETE SET NULL). The SQL statement executed was: UPDATE `craft_anselImages` SET `cover`=:yp0, `disabled`=:yp1, `id`=:yp2, `elementId`=:yp3, `fieldId`=:yp4, `userId`=:yp5, `assetId`=:yp6, `highQualAssetId`=:yp7, `thumbAssetId`=:yp8, `originalAssetId`=:yp9, `width`=:yp10, `height`=:yp11, `x`=:yp12, `y`=:yp13, `title`=:yp14, `caption`=:yp15, `position`=:yp16, `dateCreated`=:yp17, `dateUpdated`=:yp18, `uid`=:yp19 WHERE `craft_anselImages`.`id`=310. Bound with :yp0=0, :yp1=0, :yp2=310, :yp3=11882, :yp4=97, :yp5=1, :yp6=NULL, :yp7=11888, :yp8=11889, :yp9=0, :yp10='4800', :yp11='3600', :yp12='0', :yp13='0', :yp14='', :yp15='', :yp16=1, :yp17='2017-11-06 19:50:22', :yp18='2017-11-07 16:57:42', :yp19='06676d04-3a30-434d-9d09-8b15462995d2'
    

    And highlights throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}', in /home/mandaomm/public_html/tenotec.no_craft/app/framework/db/CDbCommand.php(358)

    Are we back to the thing where Ansel is looking for an image that doesn't exist?

    I found out earlier today that my hosting provider did a server update that broke another site, and have since reversed that update, and new ansel fields (as shown to exhaust memory in video) do in fact work now.

Use Markdown for formatting

Details

Clarification Requested

Public Issue

Visibility: Public
3 replies
Last reply by Stian
Created 11/7/2017 5:22 AM
Updated 11/7/2017 11:00 AM
Ansel for Craft 1.0.7-b.1
CMS Version: Craft 2.6.2994
PHP Version: 7.0.25
MySQL Version: 10.1.22-MariaDB
Additional Environment Details:

memory_limit 1024M upload_max_filesize 512M post_max_size 512M

Cookie Policy
Privacy Policy
Terms of Service

© 2023 BuzzingPixel, LLC. All rights reserved.