We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12410
    • 353 Posts
    Hi All,
    I am hosted on DigitalOcean and run MODX Revolution 2.4.0-pl. I get uncharacteristic CPU spikes at random intervals during the day e.g. 10.30am to 12:20pm and 11pm to 1255am. Bandwidth usage or diskspace usage doesn't correlate with the CPU usage. I am wondering where these CPU spikes are coming from. I run cPanel on the server and their engineers can't see any automated process causing it. Is there some extra in MODX Revolution 2.4.0-pl causing it? Where I could I even look to see if an extra causes it? See attached graph too of CPU usage.
    Thanks

    CloudLinux Server 6.7
    PHP Version 5.6.13
    MySQl 5.5.46
    Latest cPanel and Cloudlinux
    MODX Revolution 2.4.0-pl
    Apache/2.2.31
    latest mod_security

    My Extras:
    Ace
    AdvSearch
    Anayltics
    ArchiveList
    archivist
    Articles
    Batcher
    Breadcrumbs
    CacheCLear > uninstalled
    CacheMaster
    CKEditor
    CodeMirror
    Collections
    ColorPicker
    CustomURLS
    fastfield
    FormIT
    GetIDS
    getPage
    getResourceField
    getResources
    Gmarker
    If
    Image+
    include
    Janitor
    Login
    Google map TV
    Migx
    modDev Tools
    tagstoclass
    TinyMCE
    TwitterX
    uLogin
    UltimateParent
    Wayfinder
    xBug



    [ed. note: howster last edited this post 10 years, 10 months ago.]
      • 12410
      • 353 Posts
      I think phpthumb maybe doing it. Any idea guys?

      Modx error log:

      [2015-12-10 10:47:40] (ERROR @ /manager/index.php) [migxResourceMediaPath]: docid could not be determined.
      [2015-12-10 10:47:41] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /home/bhrlan/public_html/core/cache/phpthumb/www.mysite.org__srcdfbda42d70aa83355744dc27e3179a31_par6455564129777d8acea3da58b84d0906_dat1448764311.jpeg
      [2015-12-10 10:47:41] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
      OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 572
      [2015-12-10 10:47:41] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /home/bhrlan/public_html/core/cache/phpthumb/www.mysite.org__srcfe2673320085cb97b5f3b6785e9315b6_par6455564129777d8acea3da58b84d0906_dat1448764114.jpeg
      [2015-12-10 10:47:41] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
      OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 572
      [2015-12-10 10:55:02] (ERROR @ /index.php) [pThumb] Resource: 69 || Image: assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx
      Could not generate thumbnail
      phpThumb debug output:
          [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
          [1] => setSourceFilename(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx) set $this->sourceFilename to "/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx" in file "phpthumb.class.php" on line 271
          [2] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 919
          [3] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 925
          [4] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 936
          [5] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 943
          [6] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 953
          [7] => resolvePath: /home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx (allowed_dirs: Array
      (
      )
      ) in file "phpthumb.class.php" on line 1096
          [8] => resolvePath: iteration, path=/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx, base path = /home/bhrlan/public_html in file "phpthumb.class.php" on line 1115
          [9] => open_basedir: "" in file "phpthumb.class.php" on line 1082
          [10] => resolvePath: stop at component 8 in file "phpthumb.class.php" on line 1131
          [11] => resolvePath: stop at path=/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx in file "phpthumb.class.php" on line 1134
          [12] => resolvePath: path parsed, over in file "phpthumb.class.php" on line 1140
          [13] => $this->sourceFilename set to "/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx" in file "phpthumb.class.php" on line 849
          [14] => SetCacheFilename() _src set from md5($this->sourceFilename) "/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx" = "fe2673320085cb97b5f3b6785e9315b6" in file "phpthumb.class.php" on line 3443
          [15] => SetCacheFilename() _par set from md5(_farC_zc1_h500_w1280_aoe1_dpi150_q75) in file "phpthumb.class.php" on line 3476
          [16] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3236
          [17] => GetImageSize(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx) says image is x in file "phpthumb.class.php" on line 3246
          [18] => GetImageSize("/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx") failed in file "phpthumb.class.php" on line 3279
          [19] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1508
          [20] => phpThumb_tempnam() returning "/home/bhrlan/public_html/pThumbhB8edI" in file "phpthumb.class.php" on line 4275
          [21] => ImageMagickSwitchAvailable(thumbnail) = 0 in file "phpthumb.class.php" on line 1445
          [22] => IMuseExplicitImageOutputDimensions = 0 in file "phpthumb.class.php" on line 1583
          [23] => ImageMagickSwitchAvailable(density) = 0 in file "phpthumb.class.php" on line 1445
          [24] => GetImageSize(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx) FAILED with error "" in file "phpthumb.class.php" on line 1602
          [25] => GetImageSize(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx) failed in file "phpthumb.class.php" on line 1749
          [26] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 2132
          [27] => ImageMagickSwitchAvailable(quality;interlace) = 0 in file "phpthumb.class.php" on line 1442
          [28] => ImageMagick called as (convert -resize '1280x500' '/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx[0]' jpeg:'/home/bhrlan/public_html/pThumbhB8edI' 2>&1) in file "phpthumb.class.php" on line 2151
          [29] => ImageMagick failed with message (sh: convert: command not found) in file "phpthumb.class.php" on line 2156
          [30] => deleting "/home/bhrlan/public_html/pThumbhB8edI" in file "phpthumb.class.php" on line 2188
          [31] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3286
          [32] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3215
          [33] => SetOrientationDependantWidthHeight() setting w="1280", h="500" in file "phpthumb.class.php" on line 3231
          [34] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3343
          [35] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3603
          [36] => starting ImageCreateFromFilename(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx) in file "phpthumb.class.php" on line 3518
          [37] => empty $filename or GetImageSize(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.4.28.15.SP_.CHOICE.docx) failed in file "phpthumb.class.php" on line 3567
          [38] => Populating $rawimagedata in file "phpthumb.class.php" on line 3575
          [39] => attempting ImageCreateFromStringReplacement($rawimagedata (97779 bytes), true) in file "phpthumb.class.php" on line 3589
          [40] => ImageCreateFromStringReplacement() calling built-in ImageCreateFromString() in file "phpthumb.class.php" on line 4159
          [41] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3674
          [42] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3726
          [43] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3728
          [44] => phpThumb() v1.7.13-201406261000
      http://phpthumb.sourceforge.net
      
      Error messages disabled.
      
      edit phpThumb.config.php and (temporarily) set
      $PHPTHUMB_CONFIG['disable_debug'] = false;
      to view the details of this error in file "phpthumb.class.php" on line 4050
          [45] => SourceImageToGD() failed in file "phpthumb.class.php" on line 351
      ----------------------
      
      [2015-12-10 10:55:02] (ERROR @ /index.php) [pThumb] Resource: 69 || Image: assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx
      Could not generate thumbnail
      phpThumb debug output:
          [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
          [1] => setSourceFilename(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx) set $this->sourceFilename to "/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx" in file "phpthumb.class.php" on line 271
          [2] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 919
          [3] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 925
          [4] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 936
          [5] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 943
          [6] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 953
          [7] => resolvePath: /home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx (allowed_dirs: Array
      (
      )
      ) in file "phpthumb.class.php" on line 1096
          [8] => resolvePath: iteration, path=/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx, base path = /home/bhrlan/public_html in file "phpthumb.class.php" on line 1115
          [9] => resolvePath: stop at component 8 in file "phpthumb.class.php" on line 1131
          [10] => resolvePath: stop at path=/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx in file "phpthumb.class.php" on line 1134
          [11] => resolvePath: path parsed, over in file "phpthumb.class.php" on line 1140
          [12] => $this->sourceFilename set to "/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx" in file "phpthumb.class.php" on line 849
          [13] => SetCacheFilename() _src set from md5($this->sourceFilename) "/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx" = "dfbda42d70aa83355744dc27e3179a31" in file "phpthumb.class.php" on line 3443
          [14] => SetCacheFilename() _par set from md5(_farC_zc1_h500_w1280_aoe1_dpi150_q75) in file "phpthumb.class.php" on line 3476
          [15] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3236
          [16] => GetImageSize(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx) says image is x in file "phpthumb.class.php" on line 3246
          [17] => GetImageSize("/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx") failed in file "phpthumb.class.php" on line 3279
          [18] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1508
          [19] => phpThumb_tempnam() returning "/home/bhrlan/public_html/pThumb74h5ZW" in file "phpthumb.class.php" on line 4275
          [20] => ImageMagickSwitchAvailable(thumbnail) = 0 in file "phpthumb.class.php" on line 1445
          [21] => IMuseExplicitImageOutputDimensions = 0 in file "phpthumb.class.php" on line 1583
          [22] => ImageMagickSwitchAvailable(density) = 0 in file "phpthumb.class.php" on line 1445
          [23] => GetImageSize(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx) FAILED with error "" in file "phpthumb.class.php" on line 1602
          [24] => GetImageSize(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx) failed in file "phpthumb.class.php" on line 1749
          [25] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 2132
          [26] => ImageMagickSwitchAvailable(quality;interlace) = 0 in file "phpthumb.class.php" on line 1442
          [27] => ImageMagick called as (convert -resize '1280x500' '/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx[0]' jpeg:'/home/bhrlan/public_html/pThumb74h5ZW' 2>&1) in file "phpthumb.class.php" on line 2151
          [28] => ImageMagick failed with message (sh: convert: command not found) in file "phpthumb.class.php" on line 2156
          [29] => deleting "/home/bhrlan/public_html/pThumb74h5ZW" in file "phpthumb.class.php" on line 2188
          [30] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3286
          [31] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3215
          [32] => SetOrientationDependantWidthHeight() setting w="1280", h="500" in file "phpthumb.class.php" on line 3231
          [33] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3343
          [34] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3603
          [35] => starting ImageCreateFromFilename(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx) in file "phpthumb.class.php" on line 3518
          [36] => empty $filename or GetImageSize(/home/bhrlan/public_html/assets/resourceimages/resource69/DSC.MINUTES.5.5.15.docx) failed in file "phpthumb.class.php" on line 3567
          [37] => Populating $rawimagedata in file "phpthumb.class.php" on line 3575
          [38] => attempting ImageCreateFromStringReplacement($rawimagedata (95690 bytes), true) in file "phpthumb.class.php" on line 3589
          [39] => ImageCreateFromStringReplacement() calling built-in ImageCreateFromString() in file "phpthumb.class.php" on line 4159
          [40] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3674
          [41] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3726
          [42] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3728
          [43] => phpThumb() v1.7.13-201406261000
      http://phpthumb.sourceforge.net
      
      Error messages disabled.
      
      edit phpThumb.config.php and (temporarily) set
      $PHPTHUMB_CONFIG['disable_debug'] = false;
      to view the details of this error in file "phpthumb.class.php" on line 4050
          [44] => SourceImageToGD() failed in file "phpthumb.class.php" on line 351