Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Error since migrating to PostgreSQL backend.

    Scheduled Pinned Locked Moved Support
    4 Posts 2 Posters 24 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      darren.sloper_5044
      last edited by

      Hi

      Have been running a the last couple of releases uses the new PostgreSQL backend and have come across an issue.

      I have downgraded back to a few previous versions just to confirm the issue has occured since the first database upgrade.

      We are in the process of migrating from an old proget 5 server to a new proget 2024 server, and we use it mainly as a choco rep for our puppet system.

      Testing an choco install today I noticed that all choco installs that use the proget server fail with 'The remote server returned an error: (500) Internal Server error'

      Testing the exact same command against our Proget 5 system the command still works and the choco package installs.

      Working command from proget 5:
      choco install nxlog --version 2.11.2190 --source https://<server url>/nuget/Chocolatey/

      Failing command from proget 2024:
      choco install nxlog --version 2.11.2190 --source https://<server url>/nuget/Chocolatey/

      Obviously I have omitted the server URL.

      This all worked in 2024 prior to upgrading from MSSQL to PostgreSql

      So, the error choco gives when using proget 2024 as the source is:

      nxlog not installed. An error occurred during installation:
      Error downloading 'nxlog.2.11.2190' from 'https://<server url>/nuget/Chocolatey/package/nxlog/2.11.2190'.
      sysmon package files install failed with exit code 1. Performing other installation steps.

      is 22001: value too long for type character varying(15)

      Whereas is if you use the same URL for the old proget server (obviously changing the server url) the package downloads

      So, it appears that since the upgrade to PostGreSQL some column in a table somewhere is now maxing out at a 15 character limit causing the system to fail.

      Is this a known issue, or does anyone have any suggestions on how to resolve rather than revert back to MS SQL?

      Thanks
      Darren

      1 Reply Last reply Reply Quote 0
      • D Offline
        darren.sloper_5044
        last edited by

        The following is from the proget log if it helps:

        An error occurred processing a GET request to https://<server url>/nuget/Chocolatey/package/nxlog/2.11.2190: 22001: value too long for type character varying(15)
        
        Npgsql.PostgresException (0x80004005): 22001: value too long for type character varying(15)
           at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
           at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
           at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
           at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
           at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
           at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
           at Inedo.ProGet.Data.PostgresDatabaseContext.PostgresCommand.ExecuteReaderAsync(CancellationToken cancellationToken)
           at Inedo.Data.DatabaseContext.DbResult.CreateAsync(IGenericDbCommand command, DatabaseContext context, DateTimeOffset startTime, Stopwatch stopwatch)
           at Inedo.Data.DatabaseContext.ExecuteInternalAsync(String storedProcName, GenericDbParameter[] parameters, DatabaseCommandReturnType returnType)
           at Inedo.Data.DatabaseContext.ExecuteNonQueryAsync(String storedProcName, GenericDbParameter[] parameters)
           at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.<>c__DisplayClass15_0.<<DownloadPackageAsync>g__recordAsync|0>d.MoveNext()
        --- End of stack trace from previous location ---
           at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.DownloadPackageAsync(TPackage package, IPackageDownloadContext context, OpenPackageOptions options, PackageInstallContext installContext, CancellationToken cancellationToken)
           at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetApi.GetHandler.TransmitPackageAsync(AhHttpContext context, WebApiContext apiContext, ICanonicalNuGetPackage package, String packageFileName, Boolean includeSymbols, Boolean includeSource, Boolean includeSignature, NuGetFeed feed)
           at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetApi.GetHandler.ProcessGetRequestAsync(AhHttpContext context, WebApiContext apiContext, RequestData urlData, NuGetFeed feed)
           at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetApi.ProcessRequestAsync(AhHttpContext context, WebApiContext apiContext, NuGetFeed feed, String relativeUrl)
           at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetFeedHandler.ProcessRequestAsync(AhHttpContext context, WebApiContext apiContext, NuGetFeed feed, String relativeUrl)
           at Inedo.ProGet.WebApplication.FeedEndpoints.FeedEndpointHandler.FeedRequestHandler.ProcessRequestAsync(AhHttpContext context)
          Exception data:
            Severity: ERROR
            SqlState: 22001
            MessageText: value too long for type character varying(15)
            Where: SQL function "PackageDownloads_AddDownload" statement 1
            File: varchar.c
            Line: 640
            Routine: varchar
        
        ::Web Error on 04/06/2025 15:29:51::
        
        1 Reply Last reply Reply Quote 0
        • dean-houstonD Offline
          dean-houston inedo-engineer
          last edited by

          Hi @darren-sloper_5044 ,

          That's great to see you're giving it a shot! We'll fix this via PG-2992 in the next maintenance release, but in the meantime... it looks like the bug is in the download statistics procedure, so if you disable that feature on the feed it should work.

          Let us know what else you find,

          -- Dean

          1 Reply Last reply Reply Quote 0
          • D Offline
            darren.sloper_5044
            last edited by

            Hi @dean-houston

            Thank you for the ultra-quick response. Disabling that feature did indeed provide a workaround solution and currently testing is back on track.

            Thanks again
            Darren

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation