• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. robincm
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    robincm

    @robincm

    0
    Reputation
    1
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    robincm Unfollow Follow

    Latest posts made by robincm

    • RE: API gives 500 error but only for a specific call

      @george1421 Thanks, but I still think a more elegant solution would be to be able to purge old tasks from the database, that way instead of returning 1600+ results, the API call would only return a few hundred, and memory wouldn’t be a problem.

      I can’t work out how to do this via the Fog GUI - Tasks only shows active tasks, not historic ones. Or am I not looking in the right place?

      I don’t understand why old tasks are being kept in the database if I can’t interact with them in any way?

      Worst case maybe I can run a SQL DELETE command and purge that way? Any idea if this would have any negative impact?

      Or ideally - one for the devs - perhaps Fog could have an option to periodically delete old tasks from the database, or only store maybe x days worth of old tasks?

      Thanks for the help so far everyone!

      posted in FOG Problems
      R
      robincm
    • RE: API gives 500 error but only for a specific call

      @george1421 No computers with fog agent, I’m not using it.

      posted in FOG Problems
      R
      robincm
    • RE: API gives 500 error but only for a specific call

      @Sebastian-Roth @Tom-Elliott Increasing the PHP memory from 256M to 512M has fixed it and the tasks API call is now working, albeit a bit slow. But I am seeing >1600 tasks being returned, none of which are showing as active tasks in the GUI, so I imagine Fog must keep a record of all historic tasks. Is there a way to clear those old tasks out?

      posted in FOG Problems
      R
      robincm
    • RE: API gives 500 error but only for a specific call

      The www-error.log has many recurring entries of “PHP Fatal error: Allowed memory size of 268435456 bytes exhausted”.

      I believe that this value which equates to 256MB is set in the file /etc/php-fpm.d/www.conf

      php_admin_value[error_log] = /var/log/php-fpm/www-error.log
      php_admin_flag[log_errors] = on
      php_admin_value[memory_limit] = 256M

      I will change this last line from 256M to 512M, then restart the server and try again.

      Do you think this seems sensible? I’ve not had to change any RAM values before though, makes me think there’s maybe another underlying cause.

      posted in FOG Problems
      R
      robincm
    • API gives 500 error but only for a specific call

      I’m running Fog 1.5.6 and PowerShell API 1.6.
      Everything was working fine, then somebody had a fiddle and broke stuff (not me).
      I’ve managed to get stuff working again, for the most part, and can do things like call:
      Invoke-FogApi -Method GET
      Get-FogObject -type object -coreObject tasktype
      Get-FogObject -type object -coreObject taskstate
      Get-FogObject -type object -coreObject image
      Get-FogObject -type object -coreObject host
      I can assign images using:
      Invoke-FogApi -uriPath “host/$FogHostId/edit” -Method Put -jsonData (@{“imageID” = $ImageToDeploy.id} | ConvertTo-Json)
      I can start a deployment using:
      New-FogObject -type objecttasktype -IDofObject $FogHost.id -coreTaskObject host -jsonData (@{“taskTypeID” = $DeployTaskId; “taskName” = “Deploy $ImageName” ; “wol” = “1”} | ConvertTo-Json)
      All the above works fine.

      The only thing that doesn’t work (anymore) is:
      Get-FogObject -type object -coreObject task
      which gives me a 500 server error.
      I can see the status of tasks via the Web UI, and cancel them. It just seems to be some kind of strange API issue!

      I’ve tried restarting the Fog server, but it made no difference. I don’t really want to upgrade if I don’t have to - this used to work fine!

      Can anyone suggest anything? I’m not sure where to look to start to diagnose this.

      Thanks in advance (and thanks again Tom for your help just now!!)

      posted in FOG Problems
      R
      robincm